summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2013-03-14 22:26:08 -0400
committerJunio C Hamano <gitster@pobox.com>2013-03-16 23:30:08 -0700
commitce4c4d4ec3df274349f20431c61ed85cea038026 (patch)
tree91409aeae0b128f4db7c156fde8d0ca22e2c7933
parent03a0fb0ccf48c831060c2243f830b6a12cd8fdf3 (diff)
downloadgit-ce4c4d4ec3df274349f20431c61ed85cea038026.tar.gz
pull: Apply -q and -v options to rebase mode as well
git pull passed -q and -v only to git merge, but they can be useful for git rebase as well, so pass them there, too. In particular, using -q shuts up the "Already up-to-date." message. Especially, a new test script runs the same "pull --rebase" twice to make sure both cases are quiet, when it has something to fetch and when it is already up to date. Signed-off-by: Peter Eisentraut <peter@eisentraut.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xgit-pull.sh2
-rwxr-xr-xt/t5521-pull-options.sh27
2 files changed, 28 insertions, 1 deletions
diff --git a/git-pull.sh b/git-pull.sh
index 266e682f6c..5d97e97bd9 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -279,7 +279,7 @@ fi
merge_name=$(git fmt-merge-msg $log_arg <"$GIT_DIR/FETCH_HEAD") || exit
case "$rebase" in
true)
- eval="git-rebase $diffstat $strategy_args $merge_args"
+ eval="git-rebase $diffstat $strategy_args $merge_args $verbosity"
eval="$eval --onto $merge_head ${oldremoteref:-$merge_head}"
;;
*)
diff --git a/t/t5521-pull-options.sh b/t/t5521-pull-options.sh
index 1b06691bb4..aa31abe32b 100755
--- a/t/t5521-pull-options.sh
+++ b/t/t5521-pull-options.sh
@@ -19,6 +19,17 @@ test_expect_success 'git pull -q' '
test ! -s out)
'
+test_expect_success 'git pull -q --rebase' '
+ mkdir clonedqrb &&
+ (cd clonedqrb && git init &&
+ git pull -q --rebase "../parent" >out 2>err &&
+ test ! -s err &&
+ test ! -s out &&
+ git pull -q --rebase "../parent" >out 2>err &&
+ test ! -s err &&
+ test ! -s out)
+'
+
test_expect_success 'git pull' '
mkdir cloned &&
(cd cloned && git init &&
@@ -27,6 +38,14 @@ test_expect_success 'git pull' '
test ! -s out)
'
+test_expect_success 'git pull --rebase' '
+ mkdir clonedrb &&
+ (cd clonedrb && git init &&
+ git pull --rebase "../parent" >out 2>err &&
+ test -s err &&
+ test ! -s out)
+'
+
test_expect_success 'git pull -v' '
mkdir clonedv &&
(cd clonedv && git init &&
@@ -35,6 +54,14 @@ test_expect_success 'git pull -v' '
test ! -s out)
'
+test_expect_success 'git pull -v --rebase' '
+ mkdir clonedvrb &&
+ (cd clonedvrb && git init &&
+ git pull -v --rebase "../parent" >out 2>err &&
+ test -s err &&
+ test ! -s out)
+'
+
test_expect_success 'git pull -v -q' '
mkdir clonedvq &&
(cd clonedvq && git init &&