aboutsummaryrefslogtreecommitdiff
path: root/git-pull.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-11-27 19:24:11 -0800
committerJunio C Hamano <gitster@pobox.com>2008-11-27 19:24:11 -0800
commit98cdf78c5cf1356757ccc4d25c212ae1f38339e4 (patch)
tree8c9936b21070e664e36f2b5e61b96e371f1a50f6 /git-pull.sh
parent496db64202b11e66a080873ca9e32f1354dcfd3e (diff)
parentc6576f912fc34193a02d7ec587484f7c2ce3fe77 (diff)
downloadgit-98cdf78c5cf1356757ccc4d25c212ae1f38339e4.tar.xz
Merge branch 'ta/quiet-pull'
* ta/quiet-pull: Retain multiple -q/-v occurrences in git pull Teach/Fix pull/fetch -q/-v options
Diffstat (limited to 'git-pull.sh')
-rwxr-xr-xgit-pull.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/git-pull.sh b/git-pull.sh
index 664fe34419..1cac898a24 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -16,13 +16,17 @@ cd_to_toplevel
test -z "$(git ls-files -u)" ||
die "You are in the middle of a conflicted merge."
-strategy_args= no_stat= no_commit= squash= no_ff= log_arg=
+strategy_args= no_stat= no_commit= squash= no_ff= log_arg= verbosity=
curr_branch=$(git symbolic-ref -q HEAD)
curr_branch_short=$(echo "$curr_branch" | sed "s|refs/heads/||")
rebase=$(git config --bool branch.$curr_branch_short.rebase)
while :
do
case "$1" in
+ -q|--quiet)
+ verbosity="$verbosity -q" ;;
+ -v|--verbose)
+ verbosity="$verbosity -v" ;;
-n|--no-stat|--no-summary)
no_stat=-n ;;
--stat|--summary)
@@ -121,7 +125,7 @@ test true = "$rebase" && {
"refs/remotes/$origin/$reflist" 2>/dev/null)"
}
orig_head=$(git rev-parse --verify HEAD 2>/dev/null)
-git fetch --update-head-ok "$@" || exit 1
+git fetch $verbosity --update-head-ok "$@" || exit 1
curr_head=$(git rev-parse --verify HEAD 2>/dev/null)
if test -n "$orig_head" && test "$curr_head" != "$orig_head"
@@ -182,4 +186,4 @@ test true = "$rebase" &&
exec git-rebase $strategy_args --onto $merge_head \
${oldremoteref:-$merge_head}
exec git-merge $no_stat $no_commit $squash $no_ff $log_arg $strategy_args \
- "$merge_name" HEAD $merge_head
+ "$merge_name" HEAD $merge_head $verbosity