Sublime Forum

Mini diff suddenly stopped working in one project

#1

So I have two basically identical projects (two separate clones of the same repo), but I recently noticed that the mini diff in the gutter no longer shows up with diffs against HEAD in one of the projects. It will show lines added/changed but if I close the file and reopen the diff markers are gone. I’ve ensured that "mini_diff": true and "git_diff_target": "head" and restarting sublime, but still no diffs against HEAD. I also looked for errors or warnings in the console, but I see nothing. If I switch on git annotations it perfectly show lines changed with little circles, but I want the green lines etc. It still works in the other project, and their project settings are the same (besides some paths).

Anyone has a clue what goes wrong?

0 Likes

#2

what size is the file that won’t show the mini diff?

0 Likes

#3

It’s any file. However it seems to work for .py files in a certain directory, but not if I edit e.g. the Makefile in the same directory.

0 Likes

#4

and if you type view.settings().get('mini_diff') Enter in the ST console with the Makefile active, what output do you get? Just wondering if somehow the mini diff setting is disabled for some specific views

0 Likes

#5
>>> view.settings().get('mini_diff')
True
>>> view.settings().get('git_diff_target')
'head'
0 Likes

#6

Could it be some git settings file that interferes with it? Maybe my git repo is corrupted? git status and git diff works fine though…

0 Likes

#7

Hey @kingkeith do you happen to know how Sublime “mini diff” makes the git diff? I think it might be something with my git repo and not sublime but it’s pretty hard to troubleshoot without knowing what sublime does, and I’ve read that it doesn’t call git diff in a subprocess.

0 Likes

#8

my understanding is that Sublime HQ developed their own git library, but I don’t know any more than that. Hopefully soon one of the ST devs will chime in with some ideas of how to further investigate.

0 Likes