All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Braun <thomas.braun@virtuell-zuhause.de>
To: "René Scharfe" <l.s.r@web.de>,
	"Marek Mrva" <mrva@eof-studios.com>,
	git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: Re: [bug] Stashes lost after out-of-memory situation
Date: Sun, 25 Oct 2020 13:27:48 +0100	[thread overview]
Message-ID: <5a3db65b-1877-c5be-8077-2926637fba6e@virtuell-zuhause.de> (raw)
In-Reply-To: <618d66a8-e2c1-241c-5200-2298bfe24ac0@web.de>

On 10/24/2020 7:06 PM, René Scharfe wrote:

[...]

> Looks like stash calls rev-parse to see if a
> stash pop removed the last stash and in that case proceeds to delete the
> stash ref and its reflog

I was a bit suprised to learn that removing the last stash entry also
removes it from the reflog.

Wouldn't it be more convenient if it would be kept in the reflog even
after popping?

So that in cases like

git init
echo 1 > test
git add test
git commit -m "one" test
echo 2 > test
git stash
git checkout .
git stash pop
git checkout .
git reflog -p

my once stashed change would still be in the reflog?

  reply	other threads:[~2020-10-25 12:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-23 14:53 [bug] Stashes lost after out-of-memory situation Marek Mrva
2020-10-24 17:06 ` René Scharfe
2020-10-25 12:27   ` Thomas Braun [this message]
2020-10-25 15:42     ` René Scharfe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5a3db65b-1877-c5be-8077-2926637fba6e@virtuell-zuhause.de \
    --to=thomas.braun@virtuell-zuhause.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=l.s.r@web.de \
    --cc=mrva@eof-studios.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.