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