consider this initial Working Directory in SublimeMerge:
If I run
$ git add -- src/version.js I’d get this Staged Files diff
So far so good, the diff is correct… if we look at the hex content of that file:
you can see crlf bytes at the end.
Now, let’s unstage that file and repeat the same operation but this time using GitPython commands, if we do:
$ python Python 3.10.1 (tags/v3.10.1:2cd268a, Dec 6 2021, 18:54:59) [MSC v.1929 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.environ["GIT_PYTHON_TRACE"] = "full" >>> import logging >>> logging.basicConfig(level=logging.INFO) >>> import git INFO:git.cmd:git version -> 0; stdout: 'git version 2.34.1.windows.1' INFO:git.cmd:git version -> 0; stdout: 'git version 2.34.1.windows.1' >>> repo = git.Repo(os.getcwd()) >>> reader = repo.config_reader() >>> repo.index.add(['src\\version.js']) [(100644, ac3cbe8dabe6dde800e2cec55763cacdcb88a918, 0, src/version.js)] >>>
and we look now to SublimeMerge we’ll see the diff of the Staged Files looks different now
Any idea what could be the reason of this behaviour? I don’t get it.
I guess my question is… what’s the meaning of that diff in SublimeMerge? Because If I look to the content of that file the hex content still remains the same (obviously).
GitPython==3.1.27 over here