projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
383e45c
)
git-stash: do not remove a ref by hand.
author
Junio C Hamano
<gitster@pobox.com>
Fri, 27 Jul 2007 06:24:28 +0000
(23:24 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 27 Jul 2007 06:24:28 +0000
(23:24 -0700)
Somebody on #git noticed that "git stash clear" left a packed
ref behind for ref/stash.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-stash.sh
patch
|
blob
|
history
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 () {