FredrikNoren / ungit

The easiest way to use git. On any platform. Anywhere.
MIT License
10.42k stars 637 forks source link

Stash not showing new files #1459

Open ZimGil opened 3 years ago

ZimGil commented 3 years ago

When stashing a change with new files in it, that stash area will not show these new files but will actually apply them when putting them back into staging...

foo

ylecuyer commented 3 years ago

I had a quick look and it looks more related to how git works than ungit.

When you stash with --include-untracked (which is used in ungit) and then use git stash list --numstat the file doesn't appear (I tried various flags to get it but with no success)

This looks more like a bug in git you may try to report there instead, then we will be able to add the right flag to show them inside ungit

ZimGil commented 3 years ago

Sent a bug report to the mailing list with reference to this issue

wmertens commented 3 years ago

I'll fix this in #1315, but first I need to figure out how to show diffs for the same file across many parents.

Stashes can have 3 parents since they can contain staged, worktree and untracked files. I'm thinking that the diff should just show each section diff separately?

wmertens commented 3 years ago

Ok, fixed in #1315. If you want to try it, you need to clone the PR. It'll be a while still before it's fully stable.

image