summaryrefslogtreecommitdiff
path: root/git-repack.sh
diff options
context:
space:
mode:
authorStephen Boyd <bebarino@gmail.com>2009-06-16 15:33:00 -0700
committerJunio C Hamano <gitster@pobox.com>2009-06-18 09:50:37 -0700
commit2e6a30ef8fbaedc5f2ee199d36f7256bb0cfdf1e (patch)
tree1433ff1618c735f266ff493633e8c2682b349879 /git-repack.sh
parente064c170b4abe21f50658f2ec3b07e4ec7520767 (diff)
downloadgit-2e6a30ef8fbaedc5f2ee199d36f7256bb0cfdf1e.tar.gz
submodule, repack: migrate to git-sh-setup's say()
Now that there is say() in git-sh-setup, these scripts don't need to use their own. Migrate them over by setting GIT_QUIET and removing their custom say() functions. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-repack.sh')
-rwxr-xr-xgit-repack.sh12
1 files changed, 5 insertions, 7 deletions
diff --git a/git-repack.sh b/git-repack.sh
index 0868734723..1bf239499c 100755
--- a/git-repack.sh
+++ b/git-repack.sh
@@ -24,7 +24,7 @@ SUBDIRECTORY_OK='Yes'
. git-sh-setup
no_update_info= all_into_one= remove_redundant= unpack_unreachable=
-local= quiet= no_reuse= extra=
+local= no_reuse= extra=
while test $# != 0
do
case "$1" in
@@ -33,7 +33,7 @@ do
-A) all_into_one=t
unpack_unreachable=--unpack-unreachable ;;
-d) remove_redundant=t ;;
- -q) quiet=-q ;;
+ -q) GIT_QUIET=t ;;
-f) no_reuse=--no-reuse-object ;;
-l) local=--local ;;
--max-pack-size|--window|--window-memory|--depth)
@@ -80,13 +80,11 @@ case ",$all_into_one," in
;;
esac
-args="$args $local $quiet $no_reuse$extra"
+args="$args $local ${GIT_QUIET:+-q} $no_reuse$extra"
names=$(git pack-objects --honor-pack-keep --non-empty --all --reflog $args </dev/null "$PACKTMP") ||
exit 1
if [ -z "$names" ]; then
- if test -z "$quiet"; then
- echo Nothing new to pack.
- fi
+ say Nothing new to pack.
fi
# Ok we have prepared all new packfiles.
@@ -176,7 +174,7 @@ then
done
)
fi
- git prune-packed $quiet
+ git prune-packed ${GIT_QUIET:+-q}
fi
case "$no_update_info" in