X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=contrib%2Fexamples%2Fgit-gc.sh;h=1597e9f33f5e001995085639a448f1214010b561;hb=e9a9d6edeeafa53a203c7ae379373af5394d4fde;hp=436d7caff5c26f7c0ff8c0a410bdabccdec0a900;hpb=e986e26a86616054f96373280e8f9cc89d7ea8ca;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