Sublime Forum

Windows 10 - `git stash` and `git stash pop` are slow

#1

Noticed this on different Windows 10 machines, with different OS build versions. Stashing and popping the stash each takes about 6-7 seconds. Tried regular git commands in the terminal - they finish almost instantaneously.

1 Like

#2

Sublime Merge actually handles stashes through regular git commands, so those shouldn’t take any longer. Could you confirm whether or not it is spending time loading the changes from disk or whether git stash is actually taking that long to complete? ie. can you see the files from the popped stash instantly?

0 Likes

#3

Right, that’s why I was surprised that it takes so long, given that it’s just running regular Git commands.
I am not sure what it’s doing exactly the whole time, but the files are not affected until Sublime Merge is done.

0 Likes

#4

This is one of those shot-in-the-dark kind of things, but which git client is Merge using; do you have it set to use the one that it ships with, or have you customized it to point at the system version/an external one?

It shouldn’t make any difference since I imagine they should be the same (barring version differences, etc), but I’ve noticed in the past that the git for windows installation I have on one of my machines seems to take an abnormally long amount of time to perform what should be near instantaneous local operations (though not always because that would make figuring it out a bit easier).

I’ve never seen anything local take a long time while using the version that Merge bundles, though.

1 Like

#5

I checked - the Git binary is ‘bundled’ in this case.

0 Likes

#6

This actually helped me with an issue. It was set to system for me and I each stash pop/apply resulted in all files in the repo being staged even though I only stashed a single line in one file. After unstaging all files, the repo is back to the state which was in the stash.

As soon as I set this back to bundled git executable, stashing works as expected.

So, thanks for the tip! :slight_smile:

1 Like