Code

git-am: Run git gc only once and not for every patch.
authorMichael Stefaniuc <mstefani@redhat.com>
Fri, 4 Jan 2008 18:59:26 +0000 (19:59 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 5 Jan 2008 08:07:57 +0000 (00:07 -0800)
With "too many unreachable loose objects" git gc --auto will always
trigger. This clutters the output of git am and thus git rebase.

Signed-off-by: Michael Stefaniuc <mstefani@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-am.sh

index 65c634f77af98b3598bfb50583de05f0cf5d6eb4..5f0f241ad0bb53960d5969df5445760633f87dbc 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
@@ -469,9 +469,9 @@ do
                "$GIT_DIR"/hooks/post-applypatch
        fi
 
-       git gc --auto
-
        go_next
 done
 
+git gc --auto
+
 rm -fr "$dotest"