From f12e925ac23ad6169e046cfe05b8438a1611ad58 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E3=81=97=E3=82=89=E3=81=84=E3=81=97=E3=81=AA=E3=81=AA?= =?utf8?q?=E3=81=93?= Date: Sat, 28 Jul 2007 10:44:48 +0900 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- git-stash.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/git-stash.sh b/git-stash.sh index f90dffd4c..0073e9df5 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -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 -- 2.30.2