Sublime Forum

Hunk staging and discarding broken since day 1

#1

I’ve been having the following problem since I started using Sublime Merge (about 10 months ago or so), it’s hard to explain so I’ve recorded a video:

When staging a hunk, this unrelated junk change that appears is always near the end of the file.

Discarding error that I’ve showed in the video wasn’t caused by previous staging, it’d happen anyway.

At the end of the video is my .gitconfig setting. From the debug information regarding the file in the video, the section “=== Our Modified Files Newline Normalisation and EOL Information ===” says “input - native”.

0 Likes

#2

Does the UI after the stage represent the actual status of the git repo? It may be that the state you’re seeing before staging isn’t actually what is represented on disk and the stage causes SM to reqeury git for changes. This can be the result of a file system not properly propagating file change events.

Choosing “Tools -> Refresh” or ctrl+r does a manual refresh. If that has a similar effect, then my assumption would be correct.

Edit: Having looked at the entire video now, it looks like there is a lot more going on, so my assumption is likely incorrect. I doubt I’m in a place to help debugging this.

0 Likes

#3

“Tools > Refresh” doesn’t change anything in the UI (nor git) - junk change stays in Sublime Merge, and isn’t present in either unstaged or staged part in git bash, unless I stage the junk hunk manually from Sublime Merge.

I also checked now that there aren’t mixed line endings in the file, and all is fine, all line endings are LF.

0 Likes