Skip to content

git clean follows directory junctions rather than removing them #5320

Closed as duplicate
@jeremyd2019

Description

@jeremyd2019
  • I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options

git version 2.47.1.windows.1
cpu: x86_64
built from commit: 2cd22437f64229935dc564db969cbcbfed5e9045
sizeof-long: 4
sizeof-size_t: 8
shell-path: D:/git-sdk-64-build-installers/usr/bin/sh
feature: fsmonitor--daemon
libcurl: 8.11.0
OpenSSL: OpenSSL 3.2.3 3 Sep 2024
zlib: 1.3.1
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [Version 10.0.22631.4602]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
> type "$env:USERPROFILE\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

Editor Option: VIM
Custom Editor Path:
Default Branch Option:
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: WinSSL
CRLF Option: CRLFAlways
Bash Terminal Option: ConHost
Git Pull Behavior Option: FFOnly
Use Credential Manager: Enabled
Performance Tweaks FSCache: Enabled
Enable Symlinks: Disabled
Enable FSMonitor: Disabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

ARM64 Windows

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

Run git from python.

git clean -xfdf
  • What did you expect to occur after running these commands?

Successfully removing non-tracked files.

  • What actually happened instead?
BUG: compat/win32/fscache.c:128: Trying to allocate fsentry for long path 'B/src/rustc-1.83.0-src/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnullvm/stage0-sysroot/lib/rustlib/rustc-src/rust/build-CLANGARM64/aarch64-pc-windows-gnull
  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

Obtained during msys2-autobuild run building rust. I kind of suspect some type of circular link that Git isn't detecting/handling properly. Unfortunately I rmdir /s'ed the thing to get the runner back, but I could probably reproduce it again if you'd like me to try some commands to figure out what the link is and why Git for Windows followed it instead of removing it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions