Subject: RE: [BUG} stash show does not show untracked files stashed (reposted)

From: <[email-masked]>
Date: Mon, 2 Sep 2019 14:15:33 -0400

> -----Original Message-----
> From: Philip Oakley <[email-masked]>
> Sent: September 2, 2019 11:56 AM
> To: [email-masked];
> [email-masked]
> Cc: [email-masked]
> Subject: Re: [BUG} stash show does not show untracked files stashed
> (reposted)
> 
> On 02/09/2019 14:01, Giuseppe Crinò wrote:
> >> 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?
> >
> 
> I'd guess
> 
>   1 file changed, 0 insertions(+), 0 deletions(-), *3 files untracked*
> 
> as they are what's meant to be in the stash... (obviously format to taste)

More like this, from git stash show -p, to be consistent with git show -p 4ef9fc3 (the ref for the untracked files), showing 0000000 indicating that the file is not tracked.

diff --git a/d b/d
index e3e2f1d..f246285 100644
--- a/a
+++ b/a
@@ -2,3 +2,4 @@ This is file 1
 Yet another line
 New line
 New line 2
+ another line
diff --git a/a b/a
new file mode 100644
index 0000000..64d8b7a
--- /dev/null
+++ b/a
@@ -0,0 +1 @@
+line in a
diff --git a/b b/b
new file mode 100644
index 0000000..9aeb214
--- /dev/null
+++ b/b
@@ -0,0 +1 @@
+line in b
diff --git a/c b/c
new file mode 100644
index 0000000..87bb92b
--- /dev/null
+++ b/c
@@ -0,0 +1 @@
+line in c