Merge branch 'pe/pull-rebase-v-q'

Teach "git pull --rebase" to pass "-v/-q" command line options to
underlying "git rebase".

* pe/pull-rebase-v-q:
  pull: Apply -q and -v options to rebase mode as well
This commit is contained in:
Junio C Hamano 2013-03-25 13:58:34 -07:00
commit a8aa360017
2 changed files with 28 additions and 1 deletions

View File

@ -279,7 +279,7 @@ fi
merge_name=$(git fmt-merge-msg $log_arg <"$GIT_DIR/FETCH_HEAD") || exit merge_name=$(git fmt-merge-msg $log_arg <"$GIT_DIR/FETCH_HEAD") || exit
case "$rebase" in case "$rebase" in
true) 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}" eval="$eval --onto $merge_head ${oldremoteref:-$merge_head}"
;; ;;
*) *)

View File

@ -19,6 +19,17 @@ test_expect_success 'git pull -q' '
test ! -s out) 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' ' test_expect_success 'git pull' '
mkdir cloned && mkdir cloned &&
(cd cloned && git init && (cd cloned && git init &&
@ -27,6 +38,14 @@ test_expect_success 'git pull' '
test ! -s out) 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' ' test_expect_success 'git pull -v' '
mkdir clonedv && mkdir clonedv &&
(cd clonedv && git init && (cd clonedv && git init &&
@ -35,6 +54,14 @@ test_expect_success 'git pull -v' '
test ! -s out) 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' ' test_expect_success 'git pull -v -q' '
mkdir clonedvq && mkdir clonedvq &&
(cd clonedvq && git init && (cd clonedvq && git init &&