mirror of
https://github.com/git-for-windows/git.git
synced 2026-04-13 02:23:06 -05:00
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 <johannes.schindelin@gmx.de>
This commit is contained in:
@@ -229,6 +229,7 @@ save_stash () {
|
|||||||
create_stash "$stash_msg" $untracked
|
create_stash "$stash_msg" $untracked
|
||||||
|
|
||||||
# Make sure the reflog for stash is kept.
|
# Make sure the reflog for stash is kept.
|
||||||
|
mkdir -p "$GIT_DIR/logs/${ref_stash%/*}"
|
||||||
: >>"$GIT_DIR/logs/$ref_stash"
|
: >>"$GIT_DIR/logs/$ref_stash"
|
||||||
|
|
||||||
git update-ref -m "$stash_msg" $ref_stash $w_commit ||
|
git update-ref -m "$stash_msg" $ref_stash $w_commit ||
|
||||||
|
|||||||
Reference in New Issue
Block a user