mirror of
https://github.com/git/git.git
synced 2026-02-13 19:31:58 +00: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:
committed by
Pat Thoyts
parent
ebef08522f
commit
b788948b2c
@@ -229,6 +229,7 @@ save_stash () {
|
||||
create_stash "$stash_msg" $untracked
|
||||
|
||||
# Make sure the reflog for stash is kept.
|
||||
mkdir -p "$GIT_DIR/logs/${ref_stash%/*}"
|
||||
: >>"$GIT_DIR/logs/$ref_stash"
|
||||
|
||||
git update-ref -m "$stash_msg" $ref_stash $w_commit ||
|
||||
|
||||
Reference in New Issue
Block a user