1
0
mirror of https://github.com/git/git.git synced 2024-11-18 23:13:58 +01:00

git-stash: Make sure reflog is created for refs/stash

Earlier commit 7ab3cc70 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>
This commit is contained in:
しらいしななこ 2007-07-28 10:44:48 +09:00 committed by Junio C Hamano
parent 11bb2d4fa9
commit f12e925ac2

@ -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