* [PATCH] Pass $verbosity from git pull to git rebase
@ 2012-05-26 1:00 Iustin Pop
0 siblings, 0 replies; 2+ messages in thread
From: Iustin Pop @ 2012-05-26 1:00 UTC (permalink / raw)
To: git
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 <iusty@k1024.org>
---
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(-)
diff --git a/git-pull.sh b/git-pull.sh
index 2a10047..2920c69 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -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}"
;;
*)
diff --git a/t/t5521-pull-options.sh b/t/t5521-pull-options.sh
index 1b06691..9735fb4 100755
--- a/t/t5521-pull-options.sh
+++ b/t/t5521-pull-options.sh
@@ -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 &&
--
1.7.10
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] Pass $verbosity from git pull to git rebase
@ 2012-05-26 1:00 Iustin Pop
0 siblings, 0 replies; 2+ messages in thread
From: Iustin Pop @ 2012-05-26 1:00 UTC (permalink / raw)
To: git
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 <iusty@k1024.org>
---
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(-)
diff --git a/git-pull.sh b/git-pull.sh
index 2a10047..2920c69 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -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}"
;;
*)
diff --git a/t/t5521-pull-options.sh b/t/t5521-pull-options.sh
index 1b06691..9735fb4 100755
--- a/t/t5521-pull-options.sh
+++ b/t/t5521-pull-options.sh
@@ -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 &&
--
1.7.10
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-26 1:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-26 1:00 [PATCH] Pass $verbosity from git pull to git rebase Iustin Pop
-- strict thread matches above, loose matches on Subject: below --
2012-05-26 1:00 Iustin Pop
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).