builtin-am: handle stray state directory
commit6d42ac2941cac80b44e318d867bae7979c1af6fe
authorPaul Tan <pyokagan@gmail.com>
Tue, 4 Aug 2015 13:51:44 +0000 (4 21:51 +0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 5 Aug 2015 05:02:11 +0000 (4 22:02 -0700)
treeded5cce7dfe85003b618df8e41c933ccd17d757b
parentdf2760a576a8d26e26a6a11aa497e347c7402fd3
builtin-am: handle stray state directory

Should git-am terminate unexpectedly between the point where the state
directory is created, but the "next" and "last" files are not written
yet, a stray state directory will be left behind.

As such, since b141f3c (am: handle stray $dotest directory, 2013-06-15),
git-am.sh explicitly recognizes such a stray directory, and allows the
user to remove it with am --abort.

Re-implement this feature in builtin/am.c.

Signed-off-by: Paul Tan <pyokagan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/am.c