The point of auto gc is to pack new objects created in loose
format, so a good rule of thumb is where we do update-ref after
creating a new commit.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
Let's chuck the previous "git add/git fetch" one, and replace it
with this.
Also I realize I misread your earlier comment about "git add".
You are still among the only few people on the list that I
consider are always more right than I am ;-).
git-am.sh | 2 ++
git-commit.sh | 1 +
git-merge.sh | 1 +
git-rebase--interactive.sh | 2 ++
4 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/git-am.sh b/git-am.sh
index 6809aa0..4db4701 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -466,6 +466,8 @@ do
"$GIT_DIR"/hooks/post-applypatch
fi
+ git gc --auto
+
go_next
done
diff --git a/git-commit.sh b/git-commit.sh
index 1d04f1f..d22d35e 100755
--- a/git-commit.sh
+++ b/git-commit.sh
@@ -652,6 +652,7 @@ git rerere
if test "$ret" = 0
then
+ git gc --auto
if test -x "$GIT_DIR"/hooks/post-commit
then
"$GIT_DIR"/hooks/post-commit
diff --git a/git-merge.sh b/git-merge.sh
index 3a01db0..697bec2 100755
--- a/git-merge.sh
+++ b/git-merge.sh
@@ -82,6 +82,7 @@ finish () {
;;
*)
git update-ref -m "$rlogm" HEAD "$1" "$head" || exit 1
+ git gc --auto
;;
esac
;;
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index abc2b1c..8258b7a 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -307,6 +307,8 @@ do_next () {
rm -rf "$DOTEST" &&
warn "Successfully rebased and updated $HEADNAME."
+ git gc --auto
+
exit
}
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
| David Woodhouse | Re: [PATCH] bnx2 - use request_firmware() |
| James Bottomley | Re: Integration of SCST in the mainstream Linux kernel |
| Zdenek Kabelac | Problem: Out of memory after 2days with 2GB RAM |
| Florian Schmidt | blacklist kernel boot option |
git: | |
| Junio C Hamano | Re: git-show, was Re: What's in git.git (stable) |
| Daniel Berlin | git annotate runs out of memory |
| Eric Lesh | Re: .gitlink for Summer of Code |
| Petko Manolov | git and binary files |
| Jim Winstead Jr. | Re: Root Disk/Book Disk Compatibility |
| Doug Evans | Re: Stabilizing Linux |
| drew | Re: Linux-0.12 |
| Stephen Pierce | SLS |
| Richard Stallman | Re: Real men don't attack straw men |
| Vim Visual | lenovo x61s bsd.mp Obsd 4.2 difficulties et al. |
| Anselm R. Garbe | OpenBSD 4.0 / Xorg -> vesa 1920x1200 widescreen resolution |
| Parvinder Bhasin | BIND and CNAME-ing |
