Pass $verbosity from git pull to git rebase
PATCH 1/1 Pass $verbosity from git pull to git rebase
Currently "git pull -q" only takes effect in merge mode, as commit 7f87aff2 (which introduced "git pull -q") only passes it to git-merge. This is not nice as a "git pull --rebase -q" will result in the "Current branch master is up to date.", instead of being quiet.
The patch adds a simple unit-test that checks that the initial pull, a pull that forwards the head, and a no-op pull are all silent.
Signed-off-by Iustin Pop <[email protected]>
---
Please keep me CC-ed, not subscribed to the list.
git-pull.sh | 2 +- t/t5521-pull-options.sh | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-)
git-pull.sh +1 -1
@@ -278,7 +278,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}" ;; *)
t/t5521-pull-options.sh +14 -1
@@ -8,7 +8,9 @@ test_expect_success 'setup' ' mkdir parent && (cd parent && git init && echo one >file && git add file && - git commit -m one) + git commit -m one && + echo two >file && git add file && + git commit -m two) ' test_expect_success 'git pull -q' '
@@ -19,6 +21,17 @@ test_expect_success 'git pull -q' ' test ! -s out) ' +test_expect_success 'git pull -q --rebase' ' + mkdir clonedqr && + (cd clonedqr && git init && + git pull -q --rebase "../parent" >out 2>err && + git reset --hard -q HEAD^ >>out 2>>err && + git pull -q --rebase "../parent" >>out 2>>err && + 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 &&
Signature · 1 line
1.7.10