mirror of
https://github.com/git/git
synced 2024-08-25 02:35:46 +00:00
git-stash: do not remove a ref by hand.
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>
This commit is contained in:
parent
383e45cec4
commit
7ab3cc70a6
|
@ -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 () {
|
||||
|
|
Loading…
Reference in a new issue