{"thread":{"id":"52466","subject":"Fwd: `git stash pop -q` is deleting files.","startedAt":"2019-12-16T13:20:16Z","lastAt":"2019-12-17T16:11:28Z","messageCount":5,"participants":["Marce Romagnoli","Junio C Hamano","Thomas Gummerer"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"388249","messageId":"CA+0NiBEifgam1xVJw7F=mO_DtLgfqK9g7eHJMK5dt3yc1JpaAQ@mail.gmail.com","threadId":"52466","inReplyTo":"CA+0NiBFU46YRBFEbngK+Rc0e4uE_nSqQkYak9a-_UoTaCCb1Jg@mail.gmail.com","subject":"Fwd: `git stash pop -q` is deleting files.","fromName":"Marce Romagnoli","fromEmail":"marce.romagnoli@gmail.com","sentAt":"2019-12-16T13:19:38Z","receivedAt":"2019-12-16T13:20:16Z","isPatch":false,"sender":{"key":"marce.romagnoli@gmail.com","avatar":"https://gravatar.com/avatar/89dae50504578f6d06ed05898eae623416f0b70f2813c576814d0bba9fa7fb8e?d=mp&s=160"},"body":"Hi list,\nthis is my first time reporting (what I think is) a bug in git.\n\nWHAT\n`git stash pop -q` untracks stashed files and others.\n\nWHICH VERSION\nv2.24.1\n\nHOW-TO REPRODUCE\n- Create an empty repository\n- Create 2 files, track them and commit.\n- Change one of the files\n- `git stash`\n- `git stash pop -q`\n-- Expected: The touched file is back in the index\n-- Returned: All the files are no longer tracked.\n\nWe use this command on a pre-commit hook and we were scared for the\nfirst time we realized all our files were deleted, anyway, it was easy\nto go back.\n\nThanks for your time in advance.\n\nBest,\n\n\n\nMarcelo Romagnoli\n"},{"id":"388293","messageId":"xmqqd0cojd7r.fsf@gitster-ct.c.googlers.com","threadId":"52466","inReplyTo":"CA+0NiBEifgam1xVJw7F=mO_DtLgfqK9g7eHJMK5dt3yc1JpaAQ@mail.gmail.com","subject":"Re: Fwd: `git stash pop -q` is deleting files.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-12-16T19:13:28Z","receivedAt":"2019-12-16T19:13:33Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"I think this has already been fixed with\n\nhttp://lore.kernel.org/git/20191113150136.GB3047@cat\n\nat the tip of 'master' a few weeks ago.\n\n"},{"id":"388372","messageId":"CA+0NiBGQHK_bVdH11zRErxNTjvyU-SqJYj=CHZy3afm47+reYA@mail.gmail.com","threadId":"52466","inReplyTo":"xmqqd0cojd7r.fsf@gitster-ct.c.googlers.com","subject":"Re: Fwd: `git stash pop -q` is deleting files.","fromName":"Marce Romagnoli","fromEmail":"marce.romagnoli@gmail.com","sentAt":"2019-12-17T13:32:08Z","receivedAt":"2019-12-17T13:32:58Z","isPatch":false,"sender":{"key":"marce.romagnoli@gmail.com","avatar":"https://gravatar.com/avatar/89dae50504578f6d06ed05898eae623416f0b70f2813c576814d0bba9fa7fb8e?d=mp&s=160"},"body":"But it seems is still happening to me in 2.24.1 -latest-\n\n\nMarcelo Romagnoli\n\nEl lun., 16 dic. 2019 a las 20:13, Junio C Hamano\n(<gitster@pobox.com>) escribió:\n>\n> I think this has already been fixed with\n>\n> http://lore.kernel.org/git/20191113150136.GB3047@cat\n>\n> at the tip of 'master' a few weeks ago.\n>\n"},{"id":"388373","messageId":"20191217135945.GA5103@cat","threadId":"52466","inReplyTo":"CA+0NiBGQHK_bVdH11zRErxNTjvyU-SqJYj=CHZy3afm47+reYA@mail.gmail.com","subject":"Re: Fwd: `git stash pop -q` is deleting files.","fromName":"Thomas Gummerer","fromEmail":"t.gummerer@gmail.com","sentAt":"2019-12-17T13:59:45Z","receivedAt":"2019-12-17T13:59:59Z","isPatch":false,"sender":{"key":"t.gummerer@gmail.com","avatar":"https://avatars.githubusercontent.com/u/191004?v=4"},"body":"[please don't top-post on this list]\n\nOn 12/17, Marce Romagnoli wrote:\n> But it seems is still happening to me in 2.24.1 -latest-\n\nIt being in master doesn't mean it has made it into a release yet,\nthough it means it will in the future.  So you have a couple of\noptions in the meantime:\n\n  - Compile Git yourself from the 'master' branch\n  - Go back to an older version of git.  v2.23 didn't have this\n    problem, but it had a different issue that I was trying to fix in\n    34933d0eff (\"stash: make sure to write refreshed cache\",\n    2019-09-11), but where this bug was introduced.\n  - set the stash.useBuiltin configuration option to false, which will\n    make you use the legacy stash written as a shell script.  This\n    also shouldn't have this bug.\n\n> El lun., 16 dic. 2019 a las 20:13, Junio C Hamano\n> (<gitster@pobox.com>) escribió:\n> >\n> > I think this has already been fixed with\n> >\n> > http://lore.kernel.org/git/20191113150136.GB3047@cat\n> >\n> > at the tip of 'master' a few weeks ago.\n> >\n"},{"id":"388377","messageId":"CA+0NiBHFcVZ0RpDB6kffCA5fzdfhcGwH7k=4q15kbXeF5J7UPQ@mail.gmail.com","threadId":"52466","inReplyTo":"20191217135945.GA5103@cat","subject":"Re: Fwd: `git stash pop -q` is deleting files.","fromName":"Marce Romagnoli","fromEmail":"marce.romagnoli@gmail.com","sentAt":"2019-12-17T16:10:49Z","receivedAt":"2019-12-17T16:11:28Z","isPatch":false,"sender":{"key":"marce.romagnoli@gmail.com","avatar":"https://gravatar.com/avatar/89dae50504578f6d06ed05898eae623416f0b70f2813c576814d0bba9fa7fb8e?d=mp&s=160"},"body":"Oh ok, thanks to everybody for your time!\n\nMarcelo Romagnoli\n\nEl mar., 17 dic. 2019 a las 14:59, Thomas Gummerer\n(<t.gummerer@gmail.com>) escribió:\n>\n> [please don't top-post on this list]\n>\n> On 12/17, Marce Romagnoli wrote:\n> > But it seems is still happening to me in 2.24.1 -latest-\n>\n> It being in master doesn't mean it has made it into a release yet,\n> though it means it will in the future.  So you have a couple of\n> options in the meantime:\n>\n>   - Compile Git yourself from the 'master' branch\n>   - Go back to an older version of git.  v2.23 didn't have this\n>     problem, but it had a different issue that I was trying to fix in\n>     34933d0eff (\"stash: make sure to write refreshed cache\",\n>     2019-09-11), but where this bug was introduced.\n>   - set the stash.useBuiltin configuration option to false, which will\n>     make you use the legacy stash written as a shell script.  This\n>     also shouldn't have this bug.\n>\n> > El lun., 16 dic. 2019 a las 20:13, Junio C Hamano\n> > (<gitster@pobox.com>) escribió:\n> > >\n> > > I think this has already been fixed with\n> > >\n> > > http://lore.kernel.org/git/20191113150136.GB3047@cat\n> > >\n> > > at the tip of 'master' a few weeks ago.\n> > >\n"}]}