We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a64d778 commit a9ee9bfCopy full SHA for a9ee9bf
git-stash.sh
@@ -21,7 +21,7 @@ no_changes () {
21
clear_stash () {
22
if current=$(git rev-parse --verify $ref_stash 2>/dev/null)
23
then
24
- git update-ref -d refs/stash $current
+ git update-ref -d $ref_stash $current
25
fi
26
}
27
@@ -92,6 +92,10 @@ save_stash () {
92
clear_stash || die "Cannot initialize stash"
93
94
create_stash "$stash_msg"
95
+
96
+ # Make sure the reflog for stash is kept.
97
+ : >>"$GIT_DIR/logs/$ref_stash"
98
99
git update-ref -m "$stash_msg" $ref_stash $w_commit ||
100
die "Cannot save the current status"
101
printf >&2 'Saved "%s"\n' "$stash_msg"
0 commit comments