am: remove rebase-apply directory before gc
authorJonathan Nieder <jrnieder@gmail.com>
Mon, 22 Feb 2010 14:35:46 +0000 (08:35 -0600)
committerJunio C Hamano <gitster@pobox.com>
Tue, 23 Feb 2010 22:26:29 +0000 (14:26 -0800)
When git am does an automatic gc it doesn't clean up the rebase-apply
directory until after this has finished. This means that if the user
aborts the gc then future am or rebase operations will report that an
existing operation is in progress, which is undesirable and confusing.

Reported by Mark Brown <broonie@debian.org> through
http://bugs.debian.org/570966

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-am.sh
index 3c08d53161faa72744ab64a1391d85cf9243f006..ebfbee59d3dda5ba8a11e35f697e8e48d2565698 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
@@ -776,6 +776,5 @@ do
        go_next
 done
 
-git gc --auto
-
 rm -fr "$dotest"
+git gc --auto