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

Re: Git clean enumerates ignored directories (since 2.27)

From
Jeff King <peff@peff.net>
Date
Apr 15, 2021, 08:51 UTC
Message-ID
<YHf+m7vOQumdJXwX@coredump.intra.peff.net>
In-Reply-To
<YHdzDlAfsuZ21HR7@camp.crustytoothpaste.net>
On Wed, Apr 14, 2021 at 10:56:14PM +0000, brian m. carlson wrote:
Show 23 quoted lines
> ----
> #!/bin/sh
> 
> git init test-repo
> cd test-repo
> longname="directory"
> touch "$longname.txt"
> last=400
> for x in $(seq 1 $last); do
>   mkdir "x$longname$x"
>   mv directory* "x$longname$x"
>   mv "x$longname$x" "$longname$x"
> done
> git clean -ffdxn -e directory$last
> ----
> 
> When it fails, it will complain that it wasn't able to open the
> directory.  It still exits zero, however.
> 
> I haven't bisected this, so I don't know if those patches are related to
> the problem or not.  I'm a little short on time today to investigate
> further, but hopefully this can get someone on the right path with a
> modified version and git bisect run if nothing else.

It bisects to 8d92fb2927 (dir: replace exponential algorithm with a linear one, 2020-04-01). I won't pretend to understand everything going on in that commit, though.

-Peff
Previous: brian m. carlsonNext: Jason Gore
Message 3 of 10 in “Git clean enumerates ignored directories (since 2.27)”
  1. Jason GoreApr 14, 2021
  2. brian m. carlsonApr 14, 2021
  3. Jeff KingApr 15, 2021
  4. Jason GoreApr 22, 2021
  5. Elijah NewrenApr 22, 2021
  6. Elijah NewrenMay 7, 2021
  7. Elijah NewrenMay 7, 2021
  8. Jeff KingMay 7, 2021
  9. Jeff KingMay 7, 2021
  10. Elijah NewrenMay 7, 2021

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.