git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Fwd: `git stash pop -q` is deleting files.
       [not found]   ` <CA+0NiBFU46YRBFEbngK+Rc0e4uE_nSqQkYak9a-_UoTaCCb1Jg@mail.gmail.com>
@ 2019-12-16 13:19     ` Marce Romagnoli
  2019-12-16 19:13       ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Marce Romagnoli @ 2019-12-16 13:19 UTC (permalink / raw)
  To: git

Hi list,
this is my first time reporting (what I think is) a bug in git.

WHAT
`git stash pop -q` untracks stashed files and others.

WHICH VERSION
v2.24.1

HOW-TO REPRODUCE
- Create an empty repository
- Create 2 files, track them and commit.
- Change one of the files
- `git stash`
- `git stash pop -q`
-- Expected: The touched file is back in the index
-- Returned: All the files are no longer tracked.

We use this command on a pre-commit hook and we were scared for the
first time we realized all our files were deleted, anyway, it was easy
to go back.

Thanks for your time in advance.

Best,



Marcelo Romagnoli

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

* Re: Fwd: `git stash pop -q` is deleting files.
  2019-12-16 13:19     ` Fwd: `git stash pop -q` is deleting files Marce Romagnoli
@ 2019-12-16 19:13       ` Junio C Hamano
  2019-12-17 13:32         ` Marce Romagnoli
  0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2019-12-16 19:13 UTC (permalink / raw)
  To: Marce Romagnoli; +Cc: git

I think this has already been fixed with

http://lore.kernel.org/git/20191113150136.GB3047@cat

at the tip of 'master' a few weeks ago.


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

* Re: Fwd: `git stash pop -q` is deleting files.
  2019-12-16 19:13       ` Junio C Hamano
@ 2019-12-17 13:32         ` Marce Romagnoli
  2019-12-17 13:59           ` Thomas Gummerer
  0 siblings, 1 reply; 5+ messages in thread
From: Marce Romagnoli @ 2019-12-17 13:32 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

But it seems is still happening to me in 2.24.1 -latest-


Marcelo Romagnoli

El lun., 16 dic. 2019 a las 20:13, Junio C Hamano
(<gitster@pobox.com>) escribió:
>
> I think this has already been fixed with
>
> http://lore.kernel.org/git/20191113150136.GB3047@cat
>
> at the tip of 'master' a few weeks ago.
>

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

* Re: Fwd: `git stash pop -q` is deleting files.
  2019-12-17 13:32         ` Marce Romagnoli
@ 2019-12-17 13:59           ` Thomas Gummerer
  2019-12-17 16:10             ` Marce Romagnoli
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Gummerer @ 2019-12-17 13:59 UTC (permalink / raw)
  To: Marce Romagnoli; +Cc: Junio C Hamano, git

[please don't top-post on this list]

On 12/17, Marce Romagnoli wrote:
> But it seems is still happening to me in 2.24.1 -latest-

It being in master doesn't mean it has made it into a release yet,
though it means it will in the future.  So you have a couple of
options in the meantime:

  - Compile Git yourself from the 'master' branch
  - Go back to an older version of git.  v2.23 didn't have this
    problem, but it had a different issue that I was trying to fix in
    34933d0eff ("stash: make sure to write refreshed cache",
    2019-09-11), but where this bug was introduced.
  - set the stash.useBuiltin configuration option to false, which will
    make you use the legacy stash written as a shell script.  This
    also shouldn't have this bug.

> El lun., 16 dic. 2019 a las 20:13, Junio C Hamano
> (<gitster@pobox.com>) escribió:
> >
> > I think this has already been fixed with
> >
> > http://lore.kernel.org/git/20191113150136.GB3047@cat
> >
> > at the tip of 'master' a few weeks ago.
> >

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

* Re: Fwd: `git stash pop -q` is deleting files.
  2019-12-17 13:59           ` Thomas Gummerer
@ 2019-12-17 16:10             ` Marce Romagnoli
  0 siblings, 0 replies; 5+ messages in thread
From: Marce Romagnoli @ 2019-12-17 16:10 UTC (permalink / raw)
  To: Thomas Gummerer; +Cc: Junio C Hamano, git

Oh ok, thanks to everybody for your time!

Marcelo Romagnoli

El mar., 17 dic. 2019 a las 14:59, Thomas Gummerer
(<t.gummerer@gmail.com>) escribió:
>
> [please don't top-post on this list]
>
> On 12/17, Marce Romagnoli wrote:
> > But it seems is still happening to me in 2.24.1 -latest-
>
> It being in master doesn't mean it has made it into a release yet,
> though it means it will in the future.  So you have a couple of
> options in the meantime:
>
>   - Compile Git yourself from the 'master' branch
>   - Go back to an older version of git.  v2.23 didn't have this
>     problem, but it had a different issue that I was trying to fix in
>     34933d0eff ("stash: make sure to write refreshed cache",
>     2019-09-11), but where this bug was introduced.
>   - set the stash.useBuiltin configuration option to false, which will
>     make you use the legacy stash written as a shell script.  This
>     also shouldn't have this bug.
>
> > El lun., 16 dic. 2019 a las 20:13, Junio C Hamano
> > (<gitster@pobox.com>) escribió:
> > >
> > > I think this has already been fixed with
> > >
> > > http://lore.kernel.org/git/20191113150136.GB3047@cat
> > >
> > > at the tip of 'master' a few weeks ago.
> > >

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

end of thread, other threads:[~2019-12-17 16:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CA+0NiBEFssPJsQ8UV6vRNBxzUEsJddF4Q-=-xVq-xgNUtFbHUA@mail.gmail.com>
     [not found] ` <CA+0NiBGcYwu1Gyyv3AQEbfQCMiE0rrurzgkQzwsjHgi9cEj4wQ@mail.gmail.com>
     [not found]   ` <CA+0NiBFU46YRBFEbngK+Rc0e4uE_nSqQkYak9a-_UoTaCCb1Jg@mail.gmail.com>
2019-12-16 13:19     ` Fwd: `git stash pop -q` is deleting files Marce Romagnoli
2019-12-16 19:13       ` Junio C Hamano
2019-12-17 13:32         ` Marce Romagnoli
2019-12-17 13:59           ` Thomas Gummerer
2019-12-17 16:10             ` Marce Romagnoli

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