Sublime Forum

"Stash apply" leads to very weird state

#1

Sublime Merge stable channel build 1119.
macOS Catalina 10.15.3

I have a stash and I try to right click on it the tree and choose Apply.

What I get in working copy is all files in repo deleted and marked as unstaged:

image

If instead I go and do “git stash apply” in terminal I get what I expect - two files changed with proper very small diffs.

Ping me at zholobov@gmail.com to debug - I cannot provide the repo for you to just repro on your side.
Sorry, as a new user it does not allow me to post more than one image so I left only the most important one in the post.

0 Likes

#2

Could you post or pm me the debug info while in that state? Help>Debug Information will copy it to your clipboard.

0 Likes

#3

I checked debug info and it contains information I cannot send out. Are you interested in some specific part of the whole debug info?

0 Likes

#4

git is 2.24.1

0 Likes

#5

Hi @zholobov,

Thank you for reporting this issue!
We’ve tracked down the issue, and are working on a fix.
This will be fixed in the next build of Sublime Merge.

Thanks,
- Dylan

0 Likes

#6

Thank you. I also looked into what command it runs and looks like app runs “git stash apply -q stash@{0}” and if I do it in command line I get same results.

0 Likes

#7

Thank you for the extra information.

Could you confirm that the stash you are trying to apply (stash@{0}) matches with the stash displayed when running the command “git stash list”?

i.e. Does the stash you’re applying in Sublime Merge match the stash displayed with git stash list

0 Likes

#8

The important things to check with the debug information are whether the ‘Git Status Information’ matches with ‘Our Status Information’ and whether ‘Our config output is identical to the Git config output’.

0 Likes

#9

I distilled the issue to this:

git stash apply works

git stash apply -q does not.

0 Likes

#10

Git status information lists all files as deleted: e.g. D README.md. And also all files in root of repo and dirs in root of repo as unstaged: e.g. ?? .gitignore, ?? common/.

Our status information lists all files as unstaged: e.g. ?? README.md with nothing deleted and no directories as Git info does.

0 Likes

#11

Git config information is different from Our config information. Difference is that Git one has

credential.helper=osxkeychain

while Our one does not have it.

0 Likes

#12

@djohnston @bschaaf I updated git from 2.24.1 to latest stable 2.25.0_1 and the problem is gone. In terminal both git stash apply and git stash apply -q work identically. So it was a git bug which is fixed in 2.25.0_1.

0 Likes

#13

I might be wrong but hasn’t this already been fixed/worked around in (dev) Build 1201 for the bug in git 2.24? See the github issue.

1 Like