Commit 7ab3cc70 authored by Junio C Hamano's avatar Junio C Hamano

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: default avatarJunio C Hamano <gitster@pobox.com>
parent 383e45ce
......@@ -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 () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment