Sublime Forum

Windows paths with casing can break staging

#1

If you have a folder that changed case in windows the tracked/untracked files will show wrong files and stage won’t work since git for windows won’t stage things that hasn’t changes.
Repro steps:

mkdir gitTest
cd gitTest
git init
mkdir WrongCAsed
cd WrongCAsed
echo test > test.txt
git add .
git commit -m "Test"
cd ..
rename WrongCAsed WrongCased
cd WrongCased
echo test > test2.txt
git add .
git commit -m "Test2"

open Sublime Merge and look at Changes displayed and how the Stage button doesn’t work

EDIT: Changed the commands from bulletlist to preformatted text should be pasteable in cmd now

0 Likes

#2

I just attempted these commands on build 1058 and everything seems to work properly. After the commit Test2, I created a third test file and was able to view, stage and commit it properly from Sublime Merge (build 1058) on Windows.

If you are still running into issues, can you ensure you are on build 1058. If so, can you provide some more detail on what isn’t functioning properly from within Sublime, plus the output of Help > Debug Information?

0 Likes

#3

Hi, thanks for the fast reply.
I’m running 1058 and after running my test case I get this result


Note that when running git status in the same repo I get “nothing to commit, working tree clean” and that pressing stage in smerge changes nothing, and if I create a third file I see it twice in Untracked Files in smerge. I’m running Wiindows 10.
Debug information:

=== App Version Information ===
Build: 1058

=== Git Version Information ===
Using Git: C:\Program Files\Sublime Merge\Git\cmd\git.exe
git version 2.18.0.windows.1

=== Browse Page Information ===
HEAD: 6062dc2704b6fa6630bc6fb31b2228d7b7bf51c4
Is in merge: 0
Is in cherry_pick: 0
Is in rebase: 0
Is in revert: 0

=== Git Status Information ===
?? WrongCased/test3.txt

=== Our Status Information ===
?? WrongCAsed/test2.txt
?? WrongCAsed/test3.txt
?? WrongCased/test.txt
?? WrongCased/test3.txt

=== Git Config Information ===
color.branch=auto
color.diff=auto
color.interactive=true
color.status=auto
core.autocrlf=true
core.bare=false
core.filemode=false
core.fscache=true
core.ignorecase=true
core.logallrefupdates=true
core.repositoryformatversion=0
core.symlinks=false
credential.helper=manager
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean – %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
filter.lfs.smudge=git-lfs smudge – %f
help.format=html
http.sslcainfo=/ssl/certs/ca-bundle.crt
pack.packsizelimit=2g
rebase.autosquash=true
user.email=p.gorling@gmail.com
user.name=Patrik Görling

=== Our Config Information ===
Git Config Path Information
Using config path: /C/ProgramData/Git/config
Using config path: /C/Program Files/Sublime Merge/Git/mingw64/etc/gitconfig
Using config path: /C/Users/pgorl/.gitconfig
Using config path: /C/Users/pgorl/AppData/Roaming/Git/config
Using config path: /D/gitTest/.git/config

Our config output is identical to the Git config output

=== Git Attributes Information ===
git check_attr --all output

=== Our Modified Files Newline Normalisation and EOL Information ===

EDIT: This is fixed in dev build 1060

0 Likes

#4

Awesome, thanks for confirming!

0 Likes