Invoke "git gc --auto" from commit, merge, am and rebase.
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>
This commit is contained in:
parent
2c3c439947
commit
d4bb43ee27
@ -466,6 +466,8 @@ do
|
|||||||
"$GIT_DIR"/hooks/post-applypatch
|
"$GIT_DIR"/hooks/post-applypatch
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
git gc --auto
|
||||||
|
|
||||||
go_next
|
go_next
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -652,6 +652,7 @@ git rerere
|
|||||||
|
|
||||||
if test "$ret" = 0
|
if test "$ret" = 0
|
||||||
then
|
then
|
||||||
|
git gc --auto
|
||||||
if test -x "$GIT_DIR"/hooks/post-commit
|
if test -x "$GIT_DIR"/hooks/post-commit
|
||||||
then
|
then
|
||||||
"$GIT_DIR"/hooks/post-commit
|
"$GIT_DIR"/hooks/post-commit
|
||||||
|
@ -82,6 +82,7 @@ finish () {
|
|||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
git update-ref -m "$rlogm" HEAD "$1" "$head" || exit 1
|
git update-ref -m "$rlogm" HEAD "$1" "$head" || exit 1
|
||||||
|
git gc --auto
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
@ -307,6 +307,8 @@ do_next () {
|
|||||||
rm -rf "$DOTEST" &&
|
rm -rf "$DOTEST" &&
|
||||||
warn "Successfully rebased and updated $HEADNAME."
|
warn "Successfully rebased and updated $HEADNAME."
|
||||||
|
|
||||||
|
git gc --auto
|
||||||
|
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user