Skip to content

Commit

Permalink
git-stash: Fix listing stashes
Browse files Browse the repository at this point in the history
Commit bc9e739 "reverted" commit
f12e925

Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Emil Medve authored and Junio C Hamano committed Nov 7, 2007
1 parent a64d778 commit a9ee9bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion git-stash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ no_changes () {
clear_stash () {
if current=$(git rev-parse --verify $ref_stash 2>/dev/null)
then
git update-ref -d refs/stash $current
git update-ref -d $ref_stash $current
fi
}

Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit a9ee9bf

Please sign in to comment.