Sublime Forum

Bug (?) Submodule updated in Sublime Merge, no changes in Git Bash

#1

Fixed in Build 1070


In this case, Sublime Merge shows an unstaged change to a git submodule, which I can not stage (disappears on clicking “stage”, re-appears after a few seconds as unstaged).

In git bash, there are no changes. All submodules are already up-to-date.

Sublime Merge vs. Git Bash

I’m using the lastest Version of Sublime Merge on Windows 10

0 Likes

#2

I have the same problem on build 1058 for MacOSX. This is super noisy.

0 Likes

#3

I’m seeing this as well in build 1062 on macOS 10.14, except instead of <submodule updated> the message I see upon expanding it is

<contents empty>                                        <contents empty>

(which I assume is an attempt to show a side-by-side diff)

The submodule in question does have some files that should be ignored but currently aren’t by Sublime Merge (see this topic), but even if the submodule legitimately had a dirty work tree, it shouldn’t be showing up as unstaged changes in the parent repo as the parent repo only cares about the HEAD pointer, not the submodule’s work tree (also if it was due to these untracked files I would expect Sublime Merge to show that somehow).

0 Likes

#4

I am also seeing a red, “Deleted”, <contents empty> submodule in build 1065 on macOS 10.13.6. I know it was also in at least one previous build for me, but not in the very first build I tried a week or so ago.

  • My root repository has a branch checked out, the submodule folder is present, and git status reports all clean.
  • Submodule has no changes, no ignored files to clean up.
  • Issue appears whether the submodule has a branch checked out or a detached HEAD checked out.
  • I can run git submodule update --init --checkout --force --recursive (all the things!) in the root repository, and nothing changes.
  • I can run git clean -fdx in the submodule and nothing changes.
  • The directory name on disk exactly matches the submodule name in ./.gitmodules.

Here are some redacted excerpts from my debug information, where I’ve replaced the submodule name with SubmoduleName:

=== Git Status Information ===

=== Our Status Information ===
 D SubmoduleName

[...]

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

=== Our Modified Files Newline Normalisation and EOL Information ===
SubmoduleName: unspecified - native

Out of curiosity, if I run git check-attr --all SubmoduleName, the command has no output and exits with code 0.

0 Likes

#5

This is fixed in dev build 1066, at https://www.sublimemerge.com/dev

Note that Sublime Merge doesn’t show if individual files in the submodule have changed (you currently need to open the submodule repository for that), but it should correctly reflect when the head ref in the submodule has been changed.

2 Likes