You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stash drop (and pop) leave the entry in place when more than one stash exists #10
Stash::drop() does not remove an entry when the stash holds more than one. It computes the remaining entries but never writes the reflog back; it only moves refs/stash to the last remaining entry (
). Because pop() drops after applying, stash pop applies the top entry and leaves it on the list.
Repro
pitmaster init && git config user.name T && git config user.email t@x
echo a > a.txt && pitmaster add a.txt && pitmaster commit -m first
formin one two three;doecho$m>> a.txt; pitmaster stash push $m;done
pitmaster stash drop # "Dropped stash"
pitmaster stash list # still three entries: three, two, one
git stash list # same three entries
After the drop, refs/stash and stash@{0} in logs/refs/stash no longer agree.
Expected
The dropped entry disappears from logs/refs/stash and refs/stash points to the new top entry, as with git stash drop. Dropping the only entry already works (the ref and the log are deleted).
Activity