git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [BUG} stash show does not show untracked files stashed (reposted)
@ 2019-08-29 17:33 randall.s.becker
  2019-09-04  7:29 ` Jeff King
  0 siblings, 1 reply; 5+ messages in thread
From: randall.s.becker @ 2019-08-29 17:33 UTC (permalink / raw)
  To: git

I don't know whether this is new behaviour following changes to stash, but
here goes.

Suppose I have files a,b,c,d modified, but only file d is in the index.
After stash push  (or save) --include-untracked, stash show only displays
file d. A subsequent pop will restore files a,b,c,d. So functionally push
and pop are fine, but stash show appears to ignores files in the stash. The
git log below shows a previous commit (dce2e3e) to the WIP stash (ab0834c)
that does contain the untracked files, and git diff is happy to show the
contents when using the ref directly. It is just counterintuitive for stash
show not to display all entries previously pushed. I would have expected
symmetry. This is not new.

*-.   ab0834c (refs/stash) WIP on master: bf223fc Updated known
|\ \
| | * dce2e3e untracked files on master: bf223fc Updated known
| * a5ad1ef index on master: bf223fc Updated known
|/
* bf223fc (HEAD -> master) Updated known
* db0efd4 (origin/master, origin/HEAD) initial

This on git 2.23.0. I have the same behaviour on the Windows build of git
2.12.3.

builtins/stash.c show_stash() does not look like it accounts for multiple
paths when calling setup_revisions, so I think it is missing the path to the
untracked file ref (dce2e32). I am guessing.

Thanks,
Randall

-- Brief whoami:
 NonStop developer since approximately 211288444200000000
 UNIX developer since approximately 421664400
-- In my real life, I talk too much.




^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: [BUG} stash show does not show untracked files stashed (reposted)
@ 2019-09-02 13:01 Giuseppe Crinò
  2019-09-02 15:56 ` Philip Oakley
  0 siblings, 1 reply; 5+ messages in thread
From: Giuseppe Crinò @ 2019-09-02 13:01 UTC (permalink / raw)
  To: randall.s.becker; +Cc: git

> Suppose I have files a,b,c,d modified, but only file d is in the index.
> After stash push  (or save) --include-untracked, stash show only displays
> file d. A subsequent pop will restore files a,b,c,d. So functionally push
> and pop are fine, but stash show appears to ignores files in the stash.

This is more of an enhancement, isn't it?

To reproduce

$ touch a b c d
$ git add d
$ git stash push --include-untracked
$ git stash show
 d | 0
 1 file changed, 0 insertions(+), 0 deletions(-)

What is the output that you think should be printed?

-Giuseppe

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-09-04  7:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-29 17:33 [BUG} stash show does not show untracked files stashed (reposted) randall.s.becker
2019-09-04  7:29 ` Jeff King
  -- strict thread matches above, loose matches on Subject: below --
2019-09-02 13:01 Giuseppe Crinò
2019-09-02 15:56 ` Philip Oakley
2019-09-02 18:15   ` randall.s.becker

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).