git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 3/3] clean: improve performance when removing lots of directories

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 17, 2015, 19:13 UTC
Message-ID
<xmqqpp72pnzj.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20150417190002.GB32578@peff.net>
Jeff King <peff@peff.net> writes:
Show 8 quoted lines
>> Option 1:
>>  Plug the hole in my new is_git_repository function. A quick and dirty
>>  fix that passes the above test would be:
>
> I think that makes sense. It would be nice if you could just call
> read_gitfile, but that function is very anxious to die on error. So the
> prerequisite step would probably be to refactor that into a
> read_gitfile_gently that returns an error code.
I agree.

I was looking at the repository discovery loop to see if it makes sense to update is-git-directory() to take a gitfile, but I do not think it is a good idea (typically after is-git-directory() says "yes", we would append paths e.g. "refs/heads/master" after it to pass the result to system calls like open()). I agree that adding read-gitfile-gently and call it before running is-git-directory would be a good solution for this change.

> PS Thank you for working on this.
That too.
Thanks.
Previous: Jeff KingNext: Eric Sunshine
Message 12 of 13 in “Improving performance of git clean”
  1. 0/3 Improving performance of git cleanErik Elfström, Apr 11, 2015
  2. 0/3 Improving performance of git cleanErik Elfström, Apr 11, 2015
  3. 1/3 t7300: add tests to document behavior of clean and nested gitErik Elfström, Apr 11, 2015
  4. 2/3 p7300: add performance tests for cleanErik Elfström, Apr 11, 2015
  5. Thomas GummererApr 11, 2015
  6. erik elfströmApr 12, 2015
  7. Thomas GummererApr 12, 2015
  8. 3/3 clean: improve performance when removing lots of directoriesErik Elfström, Apr 11, 2015
  9. Junio C HamanoApr 15, 2015
  10. erik elfströmApr 17, 2015
  11. Jeff KingApr 17, 2015
  12. Junio C HamanoApr 17, 2015
  13. Eric SunshineApr 15, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.