Git diff-index listing all files including unmodified with git in WSL
What steps will reproduce the problem?
- Install git on WSL
- Install a wrapper to allow the use of git from WSL. Binary: https://github.com/andy-5/wslgit/releases
- Rename wslgit.exe to git.exe, and set git path to its folder.
- Open any windows from a repository that contain a list of files in the working tree, like "Git commit" or "Git Show Log (and click
Working tree changes
)"
What is the expected output? What do you see instead?
Only modified files should be shown; however, all files were listed.
What version of TortoiseGit and Git are you using? On what operating system?
From TortoiseGit's "About" window:
TortoiseGit 2.8.0.0 (D:\TortoiseGit\bin)
git version 2.21.0 (C:\Arch; C:\; (null)/etc\gitconfig; C:\ProgramData\Git\config)
OS: Windows 10 Pro 1809, Build 17763.379
WSL: Arch Linux, always latest, from https://github.com/yuk7/ArchWSL
Please provide any additional information below.
A wrapper is required, you can get the binary from https://github.com/andy-5/wslgit.
I thought it was wslgit's wrong, so I've made another wrapper in C#, https://github.com/sgkoishi/yawslgit, which still have the same problem.
My yawslgit logs all command argument to call git:
git diff-index --raw HEAD --numstat -C50% -M50% -z --
git ls-files -u -t -z
Here's a full list of what's happening in time order:
- Clone a random repository.
- (From WSL)
git diff-index HEAD
: Nothing shown, expected. - (From Gui) Open Git Commit window: All files shown, unexpected.
- (From WSL)
git diff-index HEAD
: All files were shown, no permission change, no linebreak change. - (From WSL)
git diff-index HEAD --numstat
: All files were shown with 0 lines of add/delete were made. - (From WSL)
git diff-index HEAD -p
: Nothing shown, expected. - (From WSL)
git commit
: nothing to commit, working tree clean, expected. - (From WSL)
git diff-index HEAD
: Nothing shown, expected.
There's no linebreak error, all files in the working directory and repository are LF, and git config core.autocrlf=false