git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Re: Bug report: git stash
       [not found] ` <DB3F5927-76A4-43F1-8A09-EEB7D0B6F720@plasticcircus.com>
@ 2019-11-20 17:26   ` John Sockwell
  2019-11-20 19:12     ` SZEDER Gábor
  0 siblings, 1 reply; 2+ messages in thread
From: John Sockwell @ 2019-11-20 17:26 UTC (permalink / raw)
  To: git@vger.kernel.org



> On 2019.11.20, at 12:20, John Sockwell <John@plasticcircus.com> wrote:
> 
> 
> Hello,
> 
> I’ve encountered unexpected behavior using the `git stash pop —quiet` after the pop the all the files in the repo are untracked.
> 
> My software versions: 
>> macOS Catalina 10.15.1
>> zsh 5.7.1
>> git 2.24.0
> 
> Steps to reproduce:
>> Create an empty repo: `mkdir /tmp/git; cd /tmp/git; git init`
>> Commit an empty file: `touch sample-file; git add sample-file; git commit --message "Initial commit”`
>> Modify the sample file: `echo "modification" > sample-file`
>> Stash the dirty tree: `git stash push`
>> Pop the stash: `git stash pop` — working tree returned to dirty state with modified: sample file
>> Stash the dirty tree again: `git stash push`
>> Pop the stash using the —quiet option: `git stash pop —quiet`
> 
> Expected result: Same behavior as without the —quiet option. Working tree to again be returned to dirty state with modified: sample-file
>> `git status`
>> On branch master
>> Changes not staged for commit:
>>   (use "git add <file>..." to update what will be committed)
>>   (use "git restore <file>..." to discard changes in working directory)
>> 	modified:   sample-file
>> 
>> no changes added to commit (use "git add" and/or "git commit -a”)
>> 
> Actual result: working tree is dirty with a different set of changes deleted: sample-file, untracked files: sample-file
>> `git status`
>> On branch master
>> Changes to be committed:
>>   (use "git restore --staged <file>..." to unstage)
>> 	deleted:    sample-file
>> 
>> Untracked files:
>>   (use "git add <file>..." to include in what will be committed)
>> 	sample-file
> 
> 


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

* Re: Bug report: git stash
  2019-11-20 17:26   ` Bug report: git stash John Sockwell
@ 2019-11-20 19:12     ` SZEDER Gábor
  0 siblings, 0 replies; 2+ messages in thread
From: SZEDER Gábor @ 2019-11-20 19:12 UTC (permalink / raw)
  To: John Sockwell; +Cc: git@vger.kernel.org

On Wed, Nov 20, 2019 at 05:26:12PM +0000, John Sockwell wrote:
> > I’ve encountered unexpected behavior using the `git stash pop —quiet` after the pop the all the files in the repo are untracked.
> > 
> > My software versions: 
> >> macOS Catalina 10.15.1
> >> zsh 5.7.1
> >> git 2.24.0
> > 
> > Steps to reproduce:
> >> Create an empty repo: `mkdir /tmp/git; cd /tmp/git; git init`
> >> Commit an empty file: `touch sample-file; git add sample-file; git commit --message "Initial commit”`
> >> Modify the sample file: `echo "modification" > sample-file`
> >> Stash the dirty tree: `git stash push`
> >> Pop the stash: `git stash pop` — working tree returned to dirty state with modified: sample file
> >> Stash the dirty tree again: `git stash push`
> >> Pop the stash using the —quiet option: `git stash pop —quiet`
> > 
> > Expected result: Same behavior as without the —quiet option. Working tree to again be returned to dirty state with modified: sample-file
> >> `git status`
> >> On branch master
> >> Changes not staged for commit:
> >>   (use "git add <file>..." to update what will be committed)
> >>   (use "git restore <file>..." to discard changes in working directory)
> >> 	modified:   sample-file
> >> 
> >> no changes added to commit (use "git add" and/or "git commit -a”)
> >> 
> > Actual result: working tree is dirty with a different set of changes deleted: sample-file, untracked files: sample-file
> >> `git status`
> >> On branch master
> >> Changes to be committed:
> >>   (use "git restore --staged <file>..." to unstage)
> >> 	deleted:    sample-file
> >> 
> >> Untracked files:
> >>   (use "git add <file>..." to include in what will be committed)
> >> 	sample-file

Thanks for the bug report.  It's a known issue that was indeed
introduced in v2.24.0, and we already have a fix for it in commit
df53c80822 (stash: make sure we have a valid index before writing it,
2019-11-13).

The previous bug report and related discussion can be found at:

  https://public-inbox.org/git/20191113150136.GB3047@cat/T/#u

Perhaps the fix will make it to a v2.24.0.1 soon-ish.


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

end of thread, other threads:[~2019-11-20 19:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3F47D50C-4E1C-4BAC-AFB9-3E908B123278@plasticcircus.com>
     [not found] ` <DB3F5927-76A4-43F1-8A09-EEB7D0B6F720@plasticcircus.com>
2019-11-20 17:26   ` Bug report: git stash John Sockwell
2019-11-20 19:12     ` SZEDER Gábor

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).