sublimehq / sublime_merge

Issue tracker for Sublime Merge
https://www.sublimemerge.com
272 stars 14 forks source link

Viewing a Stash with Untracked Files #1866

Closed justinmcbride closed 4 months ago

justinmcbride commented 5 months ago

Version info

Description

When attempting to view a stash that only includes untracked files, nothing appears.

Steps to reproduce

Have a clean working directory Create a new file Stash it without tracking it (git stash -u -- your_file.txt) View the stash in Sublime Merge

Expected behavior

The untracked files should be visible in Sublime Merge as newly-created files.

Screenshots

stash_untracked

dpjohnst commented 5 months ago

Hi @justinmcbride,

Thanks for reaching out and sharing this feedback!

Sublime Merge represents the stash as two components - an object for the modified/staged files, and then a separate object for the untracked files. This is how Git represents these stashes internally.

You can view the untracked stash object by expanding the stash (click the purple square next to the stash name in the commit graph).

I understand that this behaviour is quite unintuitive. This is something we're looking to improve - stay tuned.

Kind regards, - Dylan from Sublime HQ

justinmcbride commented 5 months ago

Hey Dylan,

Thanks for the reply! I just tried it, and I see what you mean. Clicking on the purple square does expand the stash into its two additional parents.

While this is helpful, I'd probably still contest a bit that the experience isn't correct. It seems as though the default visible stash object should present the changes from both of its constituting components. It makes sense that after expanding the object and clicking into either of those two components (modified/staged and untracked) that you would see those items individually, but shouldn't the result of those two components (the highlighted object in the original screenshot) display the full resulting combination?

Thanks again! Justin

srbs commented 4 months ago

see also: #859

justinmcbride commented 4 months ago

Duplicates #859

Thanks