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>
しらいしななこ committed
Jul 28, 2007 at 10:44 UTC
f12e925ac23ad6169e046cfe05b8438a1611ad58
1 file changed
+3
git-stash.sh
+3
@@ -36,6 +36,9 @@ save_stash () {
36
test -f "$GIT_DIR/logs/$ref_stash" ||
37
clear_stash || die "Cannot initialize stash"
38
39
+ # Make sure the reflog for stash is kept.
40
+ : >>"$GIT_DIR/logs/$ref_stash"
41
+
42
# state of the base commit
43
if b_commit=$(git rev-parse --verify HEAD)
44
then