Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
git-stash: do not remove a ref by hand.
[gitweb.git]
/
git-stash.sh
diff --git
a/git-stash.sh
b/git-stash.sh
index d9cd42d4b34d7ea938131deba305ae9ef636ec7b..f90dffd4caf88d649a9998a43aee18e57d3f594f 100755
(executable)
--- a/
git-stash.sh
+++ b/
git-stash.sh
@@
-19,9
+19,10
@@
no_changes () {
}
clear_stash () {
- logfile="$GIT_DIR/logs/$ref_stash" &&
- mkdir -p "$(dirname "$logfile")" &&
- : >"$logfile"
+ if current=$(git rev-parse --verify $ref_stash 2>/dev/null)
+ then
+ git update-ref -d refs/stash $current
+ fi
}
save_stash () {