From: "brian m. carlson" <firstname.lastname@example.org> To: Jason Gore <Jason.Gore@microsoft.com> Cc: "email@example.com" <firstname.lastname@example.org>, Elijah Newren <email@example.com> Subject: Re: Git clean enumerates ignored directories (since 2.27) Date: Wed, 14 Apr 2021 22:56:14 +0000 [thread overview] Message-ID: <YHdzDlAfsuZ21HR7@camp.crustytoothpaste.net> (raw) In-Reply-To: <DM6PR00MB06829EC5B85E0C5AC595004E894E9@DM6PR00MB0682.namprd00.prod.outlook.com> [-- Attachment #1: Type: text/plain, Size: 2380 bytes --] On 2021-04-14 at 17:17:46, Jason Gore wrote: > I'm unsure of whether this issue is Windows-specific but at the very least I suspect this is a change of behavior that would affect all platforms. > > In July 2020 I reported an issue I initially encountered in 2.27 that still seems to be present in 2.31.1.windows.1: https://github.com/git-for-windows/git/issues/2732 > > Since I haven't seen a response on the issue and it still occurs I decided to email this list as well. > > Package managers such as PNPM tend to create very long filenames due to symlinking. Having git not enumerate these ignored directories is essential to leveraging any sort of clean behavior (both for performance and for warning output) as we did before version 2.27. Our repo clean functions went from taking a few seconds to over 10 minutes due to this change in behavior. It looks like there were some changes to the dir.c code between 2.26 and 2.27 which may have impacted clean. I'm CCing Elijah Newren who wrote those patches and in any event would be more familiar with that code than I am. I've taken the liberty of pulling in your testcase from that issue and converting it to work in POSIX sh on a Linux machine. If the path is not sufficiently long for your needs, you can bump the value of the variable "last" below. ---- #!/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. > I've also had repeated problems sending you this email as your email server seems to reject any email with a URL in it (per the github link above.) I don't think that's the problem, since this email came through just fine. It's more likely that your email was being bounced for HTML, which isn't allowed on the list. -- brian m. carlson (he/him or they/them) Houston, Texas, US [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 263 bytes --]
next prev parent reply other threads:[~2021-04-14 22:56 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-14 17:17 Jason Gore 2021-04-14 22:56 ` brian m. carlson [this message] 2021-04-15 8:51 ` Jeff King 2021-04-22 17:18 ` Jason Gore 2021-04-22 17:24 ` Elijah Newren 2021-05-07 4:08 ` Elijah Newren 2021-05-07 2:31 ` Elijah Newren 2021-05-07 3:25 ` Jeff King 2021-05-07 3:43 ` Jeff King 2021-05-07 3:44 ` Elijah Newren
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=YHdzDlAfsuZ21HR7@camp.crustytoothpaste.net \ --firstname.lastname@example.org \ --cc=Jason.Gore@microsoft.com \ --email@example.com \ --firstname.lastname@example.org \ --subject='Re: Git clean enumerates ignored directories (since 2.27)' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).