{"thread":{"id":"52303","subject":"Re: Bug report: git stash","startedAt":"2019-11-20T17:26:17Z","lastAt":"2019-11-20T19:13:02Z","messageCount":2,"participants":["John Sockwell","SZEDER Gábor"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"386648","messageId":"B173575D-E845-498A-A3E4-5AF894215475@plasticcircus.com","threadId":"52303","inReplyTo":"DB3F5927-76A4-43F1-8A09-EEB7D0B6F720@plasticcircus.com","subject":"Re: Bug report: git stash","fromName":"John Sockwell","fromEmail":"john@plasticcircus.com","sentAt":"2019-11-20T17:26:12Z","receivedAt":"2019-11-20T17:26:17Z","isPatch":false,"sender":{"key":"john@plasticcircus.com","avatar":null},"body":"\n\n> On 2019.11.20, at 12:20, John Sockwell <John@plasticcircus.com> wrote:\n> \n> \n> Hello,\n> \n> I’ve encountered unexpected behavior using the `git stash pop —quiet` after the pop the all the files in the repo are untracked.\n> \n> My software versions: \n>> macOS Catalina 10.15.1\n>> zsh 5.7.1\n>> git 2.24.0\n> \n> Steps to reproduce:\n>> Create an empty repo: `mkdir /tmp/git; cd /tmp/git; git init`\n>> Commit an empty file: `touch sample-file; git add sample-file; git commit --message \"Initial commit”`\n>> Modify the sample file: `echo \"modification\" > sample-file`\n>> Stash the dirty tree: `git stash push`\n>> Pop the stash: `git stash pop` — working tree returned to dirty state with modified: sample file\n>> Stash the dirty tree again: `git stash push`\n>> Pop the stash using the —quiet option: `git stash pop —quiet`\n> \n> Expected result: Same behavior as without the —quiet option. Working tree to again be returned to dirty state with modified: sample-file\n>> `git status`\n>> On branch master\n>> Changes not staged for commit:\n>>   (use \"git add <file>...\" to update what will be committed)\n>>   (use \"git restore <file>...\" to discard changes in working directory)\n>> \tmodified:   sample-file\n>> \n>> no changes added to commit (use \"git add\" and/or \"git commit -a”)\n>> \n> Actual result: working tree is dirty with a different set of changes deleted: sample-file, untracked files: sample-file\n>> `git status`\n>> On branch master\n>> Changes to be committed:\n>>   (use \"git restore --staged <file>...\" to unstage)\n>> \tdeleted:    sample-file\n>> \n>> Untracked files:\n>>   (use \"git add <file>...\" to include in what will be committed)\n>> \tsample-file\n> \n> \n\n"},{"id":"386650","messageId":"20191120191252.GA13575@szeder.dev","threadId":"52303","inReplyTo":"B173575D-E845-498A-A3E4-5AF894215475@plasticcircus.com","subject":"Re: Bug report: git stash","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2019-11-20T19:12:52Z","receivedAt":"2019-11-20T19:13:02Z","isPatch":false,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Wed, Nov 20, 2019 at 05:26:12PM +0000, John Sockwell wrote:\n> > I’ve encountered unexpected behavior using the `git stash pop —quiet` after the pop the all the files in the repo are untracked.\n> > \n> > My software versions: \n> >> macOS Catalina 10.15.1\n> >> zsh 5.7.1\n> >> git 2.24.0\n> > \n> > Steps to reproduce:\n> >> Create an empty repo: `mkdir /tmp/git; cd /tmp/git; git init`\n> >> Commit an empty file: `touch sample-file; git add sample-file; git commit --message \"Initial commit”`\n> >> Modify the sample file: `echo \"modification\" > sample-file`\n> >> Stash the dirty tree: `git stash push`\n> >> Pop the stash: `git stash pop` — working tree returned to dirty state with modified: sample file\n> >> Stash the dirty tree again: `git stash push`\n> >> Pop the stash using the —quiet option: `git stash pop —quiet`\n> > \n> > Expected result: Same behavior as without the —quiet option. Working tree to again be returned to dirty state with modified: sample-file\n> >> `git status`\n> >> On branch master\n> >> Changes not staged for commit:\n> >>   (use \"git add <file>...\" to update what will be committed)\n> >>   (use \"git restore <file>...\" to discard changes in working directory)\n> >> \tmodified:   sample-file\n> >> \n> >> no changes added to commit (use \"git add\" and/or \"git commit -a”)\n> >> \n> > Actual result: working tree is dirty with a different set of changes deleted: sample-file, untracked files: sample-file\n> >> `git status`\n> >> On branch master\n> >> Changes to be committed:\n> >>   (use \"git restore --staged <file>...\" to unstage)\n> >> \tdeleted:    sample-file\n> >> \n> >> Untracked files:\n> >>   (use \"git add <file>...\" to include in what will be committed)\n> >> \tsample-file\n\nThanks for the bug report.  It's a known issue that was indeed\nintroduced in v2.24.0, and we already have a fix for it in commit\ndf53c80822 (stash: make sure we have a valid index before writing it,\n2019-11-13).\n\nThe previous bug report and related discussion can be found at:\n\n  https://public-inbox.org/git/20191113150136.GB3047@cat/T/#u\n\nPerhaps the fix will make it to a v2.24.0.1 soon-ish.\n\n"}]}