Merge branch 'sb/quiet-porcelains'

* sb/quiet-porcelains:
  stash: teach quiet option
  am, rebase: teach quiet option
  submodule, repack: migrate to git-sh-setup's say()
  git-sh-setup: introduce say() for quiet options
  am: suppress apply errors when using 3-way
  t4150: test applying with a newline in subject
This commit is contained in:
Junio C Hamano
2009-07-01 19:40:50 -07:00
12 changed files with 225 additions and 74 deletions

View File

@ -14,23 +14,11 @@ require_work_tree
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 ()
{
@ -137,7 +125,7 @@ cmd_add()
shift
;;
-q|--quiet)
quiet=1
GIT_QUIET=1
;;
--reference)
case "$2" in '') usage ;; esac
@ -273,7 +261,7 @@ cmd_init()
do
case "$1" in
-q|--quiet)
quiet=1
GIT_QUIET=1
;;
--)
shift
@ -333,7 +321,7 @@ cmd_update()
case "$1" in
-q|--quiet)
shift
quiet=1
GIT_QUIET=1
;;
-i|--init)
init=1
@ -659,7 +647,7 @@ cmd_status()
do
case "$1" in
-q|--quiet)
quiet=1
GIT_QUIET=1
;;
--cached)
cached=1
@ -713,7 +701,7 @@ cmd_sync()
do
case "$1" in
-q|--quiet)
quiet=1
GIT_QUIET=1
shift
;;
--)
@ -768,7 +756,7 @@ do
command=$1
;;
-q|--quiet)
quiet=1
GIT_QUIET=1
;;
-b|--branch)
case "$2" in