sublimehq / sublime_merge

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

stash details does not include untracked files in the stash #1760

Closed Zorro666 closed 1 year ago

Zorro666 commented 1 year ago

Version info

Description

I created a stash with just untracked files in it using the Sublime Merge UI and the --include-untracked option.

When I view the stash in the UI it shows as empty.

If I use git command line git stash show stash@{0} --include-untracked then it shows the contents

 doit.sh | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

Steps to reproduce

Steps to reproduce the behavior:

  1. Create a new file in a repository
  2. Run command stash with the extra option of --include-untracked
  3. Click on the stash in the commits view and it won't include the untracked file(s) in the stash contents.

Expected behavior

Viewing the stash contents would include any untracked file(s) in the stash.

Screenshots

Creating the Stash

image

Viewing the Stash

image

Command line Output git stash show stash@{0} --include-untracked

 sublime-merge-test.txt | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
dpjohnst commented 1 year ago

G'day @Zorro666,

Thanks for sharing this feedback.

Sublime Merge tries to match Git as closely as possible. Git stores the untracked files as a separate ref. This ref can be viewed by by expanding the stash ref in the commit graph (clicking the square that represents an expandable ref).

That being said, it's clear we could do much more to make this visible as it's non-intuitive and difficult to spot (see: https://github.com/sublimehq/sublime_merge/issues/859). We're investigating ways to improve this visibility, and will have some improvements coming in the future.

I'll go ahead and close this issue as it's a duplicate of the issue linked above.

Cheers, - Dylan from Sublime HQ

Zorro666 commented 1 year ago

Thank you for the update and for solving my problem. Now I know how to see my stashed untracked files contents which is all I needed.