Skip to content

Commit 2543cc5

Browse files
committed
Git synchronizers: run git gc every once in a while
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent db99b4a commit 2543cc5

File tree

4 files changed

+5
-0
lines changed

4 files changed

+5
-0
lines changed

git-cvs-synchronizer.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ fi
108108

109109
refs="$(git for-each-ref --shell --format '%(refname)')"
110110

111+
git gc --auto
111112
for remote
112113
do
113114
eval git push \"$remote\" $refs

git-hg-synchronizer.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ git remote add --mirror=fetch origin hg::"$HG_URL"
3333

3434
git fetch origin
3535

36+
git gc --auto
3637
for url
3738
do
3839
git push --all "$url"

git-svn-synchronizer.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ args="$(git for-each-ref --shell --format '%(refname)' refs/remotes/ |
9494
sed -e "s/^'\(refs\/remotes\/\(.*\)\)'$/'\1:refs\/heads\/svn\/\2'/" \
9595
-e 's/:refs\/heads\/svn\/tags\//:refs\/tags\//')"
9696

97+
git gc --auto
9798
for remote
9899
do
99100
eval git push $force \"$remote\" $args

git-synchronizer.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ then
224224
add_error "$(printf "Incompatible updates:\n%s\n\n" "$message")"
225225
fi
226226

227+
test -z "$todo" || git gc --auto
228+
227229
# make it easier to test whether a name is in $disagreeing via:
228230
# test "$disagreeing" != "${disagreeing#* $name }"
229231
disagreeing=" $disagreeing "

0 commit comments

Comments
 (0)