summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e064c17)
raw | patch | inline | side by side (parent: e064c17)
author | Stephen Boyd <bebarino@gmail.com> | |
Tue, 16 Jun 2009 22:33:00 +0000 (15:33 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 18 Jun 2009 16:50:37 +0000 (09:50 -0700) |
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>
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>
git-repack.sh | patch | blob | history | |
git-submodule.sh | patch | blob | history |
diff --git a/git-repack.sh b/git-repack.sh
index 0868734723b3c96144bfa9360a9e19ebae1995f7..1bf239499c7bdb04622ea6fa239bd7c0ace42065 100755 (executable)
--- a/git-repack.sh
+++ b/git-repack.sh
. 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
-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)
;;
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.
done
)
fi
- git prune-packed $quiet
+ git prune-packed ${GIT_QUIET:+-q}
fi
case "$no_update_info" in
diff --git a/git-submodule.sh b/git-submodule.sh
index 19a3a840fdc7eed4994741e13306b71a3ffd2ada..58d2fd2ccb65925e81b1aab3c8e624359b286a14 100755 (executable)
--- a/git-submodule.sh
+++ b/git-submodule.sh
command=
branch=
-quiet=
reference=
cached=
nofetch=
update=
-#
-# print stuff on stdout unless -q was specified
-#
-say()
-{
- if test -z "$quiet"
- then
- echo "$@"
- fi
-}
-
# Resolve relative url by appending to parent's url
resolve_relative_url ()
{
shift
;;
-q|--quiet)
- quiet=1
+ GIT_QUIET=1
;;
--reference)
case "$2" in '') usage ;; esac
do
case "$1" in
-q|--quiet)
- quiet=1
+ GIT_QUIET=1
;;
--)
shift
case "$1" in
-q|--quiet)
shift
- quiet=1
+ GIT_QUIET=1
;;
-i|--init)
init=1
do
case "$1" in
-q|--quiet)
- quiet=1
+ GIT_QUIET=1
;;
--cached)
cached=1
do
case "$1" in
-q|--quiet)
- quiet=1
+ GIT_QUIET=1
shift
;;
--)
command=$1
;;
-q|--quiet)
- quiet=1
+ GIT_QUIET=1
;;
-b|--branch)
case "$2" in