Sublime Forum

Bug: Sublime Merge shows every submitted file as staged if .git dir has symlinks

#1

I’m trying to use Sublime Merge on the Android Emulator codebase, which is a collection of git repositories downloaded together using the “repo” tool: https://android.googlesource.com/platform/external/qemu/+/emu-master-dev/android/docs/DEVELOPMENT.TXT

I can use the git command and other git-based tools normally, but in Sublime Merge I see “11062 staged files, 10 unstaged files”… basically every file in the repository.

The difference is that the .git folder has symlinks instead of the files themselves, I don’t think Sublime Merge handles this in the same way as the git tool:

(emulator/external/qemu) $ ls -lha .git

COMMIT_EDITMSG
config -> …/…/…/.repo/projects/external/qemu.git/config
description -> …/…/…/.repo/project-objects/platform/external/qemu.git/description
FETCH_HEAD
HEAD
hooks -> …/…/…/.repo/project-objects/platform/external/qemu.git/hooks
index
info -> …/…/…/.repo/project-objects/platform/external/qemu.git/info
logs -> …/…/…/.repo/projects/external/qemu.git/logs
objects -> …/…/…/.repo/project-objects/platform/external/qemu.git/objects
ORIG_HEAD
packed-refs -> …/…/…/.repo/projects/external/qemu.git/packed-refs
refs -> …/…/…/.repo/projects/external/qemu.git/refs
rr-cache -> …/…/…/.repo/project-objects/platform/external/qemu.git/rr-cache
shallow -> …/…/…/.repo/projects/external/qemu.git/shallow
svn -> …/…/…/.repo/project-objects/platform/external/qemu.git/svn

If I manually copy the directory and convert symlinks to files, Sublime Merge works normally:

(emulator/external) $ rsync qemu/ qemu2/ -a --copy-links -v --exclude objs/

0 Likes

#2

Can you confirm which build of Sublime Merge you’re running (the build number is in the about box), and which OS you’re running on?

0 Likes

#3

I’m using build 1062, and observe this issue on both macOS (10.13.6) and Linux.

0 Likes

#4

Thanks for the quick fix! I’ve confirmed that build 1063 resolves the issue.

0 Likes

#5

I’m seeing similar issue with 1092 on linux, where all files are marked as staged, I wonder if the fix is broken in recent build? Thanks.

0 Likes