aboutsummaryrefslogtreecommitdiff
path: root/git-pull.sh
diff options
context:
space:
mode:
authorTuncer Ayaz <tuncer.ayaz@gmail.com>2008-11-15 01:14:24 +0100
committerJunio C Hamano <gitster@pobox.com>2008-11-14 17:18:32 -0800
commit7f87aff22c0232a5ce327ea3d2923776936c97f4 (patch)
treee7fe32985b21b731d159fb6f73768fc09d1d63af /git-pull.sh
parenta0d3ab9c277f1a198ec8e29432c0127d4cf719d2 (diff)
downloadgit-7f87aff22c0232a5ce327ea3d2923776936c97f4.tar.gz
git-7f87aff22c0232a5ce327ea3d2923776936c97f4.tar.xz
Teach/Fix pull/fetch -q/-v options
Implement git-pull --quiet and git-pull --verbose by adding the options to git-pull and fixing verbosity handling in git-fetch. Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 664fe3441..8866f2a1e 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=-q ;;
+ -v|--verbose)
+ 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