summaryrefslogtreecommitdiff
path: root/git-stash.sh
diff options
context:
space:
mode:
authorしらいしななこ <nanako3@bluebottle.com>2007-07-28 10:44:48 +0900
committerJunio C Hamano <gitster@pobox.com>2007-07-28 00:06:00 -0700
commitf12e925ac23ad6169e046cfe05b8438a1611ad58 (patch)
tree8afe159284e9d4ea74f482038799f45b3e80fbd9 /git-stash.sh
parent11bb2d4fa9ebc7481828c25752d8c23233b24c76 (diff)
downloadgit-f12e925ac23ad6169e046cfe05b8438a1611ad58.tar.gz
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>
Diffstat (limited to 'git-stash.sh')
-rwxr-xr-xgit-stash.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/git-stash.sh b/git-stash.sh
index f90dffd4ca..0073e9df5f 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