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

Re: [PATCH] builtin/clean.c: Handle disappearing files

From
Junio C Hamano <gitster@pobox.com>
Date
May 16, 2015, 19:21 UTC
Message-ID
<xmqqwq08e3bz.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1431713612.17436.27.camel@ubuntu>
David Turner <dturner@twopensource.com> writes:
> So maybe we should just move the lstat below the pathspec check.  This
> is probably faster in some cases anyway.  What do you think?

I also was wondering about the placement of that lstat; because having it before the pathspec filtering didn't make sense to me at all. If we are not told to clean some parts of the tree, we really shouldn't be looking at that part of the tree. I think such a change is desirable and the justification of the change should be based solely on the above---limit first and then check, don't check what we were not told to look at.

And if such a change lets you solve your original issue, that is a nice side effect I am happy to see. By excluding the paths that are unstable (because other processes randomly muck with them without coordinating with the user) explicitly when running "git clean", the user _is_ saying that s/he is aware of the issue and is actively avoiding modifications by the third-party would not get in the way, so I wouldn't call that sweeping it under the rug, like I did for your original one.

Thanks.
Previous: David Turner
Message 8 of 8 in “builtin/clean.c: Handle disappearing files”
  1. builtin/clean.c: Handle disappearing filesDavid Turner, May 14, 2015
  2. Junio C HamanoMay 14, 2015
  3. David TurnerMay 14, 2015
  4. Junio C HamanoMay 14, 2015
  5. David TurnerMay 14, 2015
  6. Junio C HamanoMay 15, 2015
  7. David TurnerMay 15, 2015
  8. Junio C HamanoMay 16, 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.