From 3c8365cf359115ce830597c853ddc87145d4f1d3 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 27 Aug 2012 13:13:46 -0500 Subject: [PATCH] git stash: make sure that .git/logs/refs/ exists If the user has not activated reflogs, or if nothing has been recorded yet (as is the case directly after cloning), said directory may not exist yet. Signed-off-by: Johannes Schindelin --- git-stash.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/git-stash.sh b/git-stash.sh index 4798bcf0e5..7b04cbf9cc 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -262,6 +262,7 @@ save_stash () { clear_stash || die "$(gettext "Cannot initialize stash")" create_stash "$stash_msg" $untracked + mkdir -p "$GIT_DIR/logs/${ref_stash%/*}" store_stash -m "$stash_msg" -q $w_commit || die "$(gettext "Cannot save the current status")" say Saved working directory and index state "$stash_msg" -- 2.11.4.GIT