# Re: [BUG} stash show does not show untracked files stashed (reposted)

3 messages from 2019-09-02 to 2019-09-02. Participants: Giuseppe Crinò, Philip Oakley, randall.s.becker@rogers.com.
Thread: https://gitlist.dev/t/51787

## Giuseppe Crinò, 2019-09-02 13:01

Subject: Re: [BUG} stash show does not show untracked files stashed (reposted)
Message-ID: <20190902130128.GA2843@instance-1.europe-west6-a.c.vaulted-journal-250706.internal>
URL: https://gitlist.dev/e/20190902130128.GA2843%40instance-1.europe-west6-a.c.vaulted-journal-250706.internal

```
> 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

```

## Philip Oakley, 2019-09-02 15:56

Subject: Re: [BUG} stash show does not show untracked files stashed (reposted)
Message-ID: <966960ff-a8bb-42bb-0b0a-13cd00852068@iee.email>
URL: https://gitlist.dev/e/966960ff-a8bb-42bb-0b0a-13cd00852068%40iee.email
In-Reply-To: <20190902130128.GA2843@instance-1.europe-west6-a.c.vaulted-journal-250706.internal>

```
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)
Philip


```

## randall.s.becker@rogers.com, 2019-09-02 18:15

Subject: RE: [BUG} stash show does not show untracked files stashed (reposted)
Message-ID: <006301d561ba$69ca61e0$3d5f25a0$@rogers.com>
URL: https://gitlist.dev/e/006301d561ba%2469ca61e0%243d5f25a0%24%40rogers.com
In-Reply-To: <966960ff-a8bb-42bb-0b0a-13cd00852068@iee.email>

```
> -----Original Message-----
> From: Philip Oakley <philipoakley@iee.email>
> Sent: September 2, 2019 11:56 AM
> To: 002901d55e8f$e4a4af70$adee0e50$@rogers.com;
> randall.s.becker@rogers.com
> Cc: git@vger.kernel.org
> 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



```
