X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=contrib%2Fexamples%2Fgit-gc.sh;h=1597e9f33f5e001995085639a448f1214010b561;hb=847d10f56d7853cd0e139a7c2e6ad0ad2de5c464;hp=436d7caff5c26f7c0ff8c0a410bdabccdec0a900;hpb=e1341abc3759950e891822088cb0163b71b316b3;p=git.git diff --git a/contrib/examples/git-gc.sh b/contrib/examples/git-gc.sh index 436d7caff..1597e9f33 100755 --- a/contrib/examples/git-gc.sh +++ b/contrib/examples/git-gc.sh @@ -9,7 +9,7 @@ SUBDIRECTORY_OK=Yes . git-sh-setup no_prune=: -while case $# in 0) break ;; esac +while test $# != 0 do case "$1" in --prune) @@ -30,8 +30,8 @@ notbare|"") esac test "true" != "$pack_refs" || -git-pack-refs --prune && -git-reflog expire --all && +git pack-refs --prune && +git reflog expire --all && git-repack -a -d -l && -$no_prune git-prune && -git-rerere gc || exit +$no_prune git prune && +git rerere gc || exit