Commit a9ee9bf9 authored by Emil Medve's avatar Emil Medve Committed by Junio C Hamano

git-stash: Fix listing stashes

Commit bc9e7399 "reverted" commit
f12e925aSigned-off-by: default avatarEmil Medve <>
Signed-off-by: default avatarJunio C Hamano <>
parent a64d7784
......@@ -21,7 +21,7 @@ no_changes () {
clear_stash () {
if current=$(git rev-parse --verify $ref_stash 2>/dev/null)
git update-ref -d refs/stash $current
git update-ref -d $ref_stash $current
......@@ -92,6 +92,10 @@ save_stash () {
clear_stash || die "Cannot initialize stash"
create_stash "$stash_msg"
# Make sure the reflog for stash is kept.
: >>"$GIT_DIR/logs/$ref_stash"
git update-ref -m "$stash_msg" $ref_stash $w_commit ||
die "Cannot save the current status"
printf >&2 'Saved "%s"\n' "$stash_msg"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment