git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <randall.s.becker@rogers.com>
To: <git@vger.kernel.org>
Subject: [BUG} stash show does not show untracked files stashed (reposted)
Date: Thu, 29 Aug 2019 13:33:36 -0400	[thread overview]
Message-ID: <002901d55e8f$e4a4af70$adee0e50$@rogers.com> (raw)

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.




             reply	other threads:[~2019-08-29 17:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-29 17:33 randall.s.becker [this message]
2019-09-04  7:29 ` [BUG} stash show does not show untracked files stashed (reposted) 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='002901d55e8f$e4a4af70$adee0e50$@rogers.com' \
    --to=randall.s.becker@rogers.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).