Skip to content

Commit

Permalink
git-stash: Make sure reflog is created for refs/stash
Browse files Browse the repository at this point in the history
Earlier commit 7ab3cc7 fixed "stash clear" but broke save_stash,
because it forgot to make sure the reflog file exists before saving.

Signed-off-by: Nanako Shiraishi <nanako3@bluebottle.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
しらいしななこ authored and Junio C Hamano committed Jul 28, 2007
1 parent 11bb2d4 commit f12e925
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions git-stash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ save_stash () {
test -f "$GIT_DIR/logs/$ref_stash" ||
clear_stash || die "Cannot initialize stash"

# Make sure the reflog for stash is kept.
: >>"$GIT_DIR/logs/$ref_stash"

# state of the base commit
if b_commit=$(git rev-parse --verify HEAD)
then
Expand Down

0 comments on commit f12e925

Please sign in to comment.