Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 2280b8f

Browse files
dschokasal
authored andcommitted
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 <[email protected]>
1 parent 9469666 commit 2280b8f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

git-stash.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ save_stash () {
262262
clear_stash || die "$(gettext "Cannot initialize stash")"
263263

264264
create_stash "$stash_msg" $untracked
265+
mkdir -p "$GIT_DIR/logs/${ref_stash%/*}"
265266
store_stash -m "$stash_msg" -q $w_commit ||
266267
die "$(gettext "Cannot save the current status")"
267268
say Saved working directory and index state "$stash_msg"

0 commit comments

Comments
 (0)