Sublime Forum

Staged files shown as unstaged

#1

Environment:

  • Mac OS X 10.11.6
  • Sublime Merge (Build 1055)

Steps to reproduce:

  1. download php-7.2.10
  2. git init & add all files
  3. Sublime Merge shows 47 unstaged files

Screenshot:

1 Like

#2

Thanks for your report, however I was unable to replicate the issue. The steps I followed:

  1. Download php-7.2.10.tar.xz http://www.php.net/downloads.php, and extract it to a new folder
  2. git init; git add .; git commit -m .

Sublime Merge showed no modified files for me after doing the above. I did this on build 1058, but had earlier tried on 1055 and didn’t see it then either.

This is on a MacBook Pro running 10.13.4, using the APFS file system.

From your screenshot, it looks to be a unicode normalisation issue. MacOS has different normalisation rules depending on the type of file system it’s working with. It’d be great if you could confirm the type of FS you’re using (‘System Report’ from the system About box should have this), and what your git core.precomposeunicode setting is (i.e., git config core.precomposeunicode)

0 Likes

#3

it looks to be a unicode normalisation issue

Yes, I can confirm this issue is related to Unicode normalization.
I can easily reproduce this issue with some decomposable Japanese filename.

type of FS you’re using

Journaled HFS+

what your git core.precomposeunicode setting is

I have not manually changed this setting on my machine/repo before.


I created a new empty repo with a single file named が inside, and tested stage/unstage this file in different settings.

With core.precomposeUnicode = true: (default)
Command line git works as expected.
GitUp works as expected.
Sublime Merge does not work.

Screen Shot 2018-09-23 at 21.49.36.png

With core.precomposeUnicode = false:
Command line git cannot find the filename I specified. I am not sure how to pass a pathspec in quoted form.
GitUp works as expected.
Sublime Merge works as expected.

It seems that Sublime Merge assumes a decomposed Unicode normalization?

0 Likes

#4

I’m seeing the same issue, and it’s definitely unicode normalization. These files are not modified in any way and therefore should not show up here. Other Git clients are able to handle these files correctly (Tower, GitUp, Sourcetree).

Environment:

  • macOS 10.13.6
  • Filesystem: APFS
  • Sublime Merge (Build 1058)

0 Likes

#5

I believe that this should potentially be resolved in dev build 1059; the changelog is:

  • Added support for core.filemode
  • Merge Tool: Improved LF vs CRLF selection logic
  • Tweaked scroll delta when scrolling with the mouse wheel
  • Mac: Query login shell for default env vars
  • Mac: Added support for core.precomposedunicode
  • Fixed not checking $HOME/.config/git/config as a default config file path
  • Windows: Adjust $HOME calculation to match Git

Currently dev builds are for licensed users only, but @jps mentioned in the following post that this restriction will be lifted for a while in the next dev build.

0 Likes

#6

Thanks for the reports.

Support for core.precomposedunicode was added in 1059 (a dev build). It’ll be available in a stable build later this week.

0 Likes

#7

Confirmed this is now fixed. Not sure about build 1059, but 1060 for sure.

0 Likes