You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows junctions produce false deletions and invalid diffs #2194
LibGit2Sharp 0.32.0 with libgit2 1.8.6 does not traverse NTFS directory junctions inside a working tree.
In one of my actual repositories containing five junctions:
git.exe status reports 7 correct changes
Repository.RetrieveStatus() reports 2,794 entries
Junction roots are reported as NewInWorkdir
2,774 tracked files below them are falsely reported as DeletedFromWorkdir
Diff.Compare<Patch>() reports a modified junction backed file as a complete deletion to /dev/null, while git.exe diff produces the correct modification
This appears related to #1726, but also affects tracked descendants, status, diff, and staging.
Core Git for Windows handles the same junctions correctly.
Environment:
Windows 10 x64, build 19045
NTFS
Git for Windows 2.47.1
.NET SDK 10.0.301
LibGit2Sharp 0.32.0
bundled libgit2 1.8.6
core.symlinks=false
core.ignorecase=true
Junction and target are on the same NTFS volume
Junction has Windows attributes Directory, ReparsePoint
The junction itself is not tracked, because Git does not track directories. Files below the junction are tracked. Core Git correctly treats them as ordinary working-tree files; libgit2 reports the junction root as untracked and its tracked descendants as deleted.
Activity