cherry-pick: fix --quit not deleting CHERRY_PICK_HEAD
commit3e7dd9920823fc2a88f8ec5390bd100d707f9129
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Thu, 16 Aug 2018 16:06:08 +0000 (16 18:06 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 16 Aug 2018 17:02:55 +0000 (16 10:02 -0700)
tree199eab0c05cafd2690a62957156419cc0c7bfb66
parent4dde7b8799dec0e7aecb04fdc55c656e674cff6f
cherry-pick: fix --quit not deleting CHERRY_PICK_HEAD

--quit is supposed to be --abort but without restoring HEAD. Leaving
CHERRY_PICK_HEAD behind could make other commands mistake that
cherry-pick is still ongoing (e.g. "git commit --amend" will refuse to
work). Clean it too.

For --abort, this job of deleting CHERRY_PICK_HEAD is on "git reset"
so we don't need to do anything else. But let's add extra checks in
--abort tests to confirm.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/revert.c
t/t3510-cherry-pick-sequence.sh