Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] pull: Apply -q and -v options to rebase mode as well

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:56:25

Peter Eisentraut [off-list ref] writes:
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.  Add test cases to prove it.

Signed-off-by: Peter Eisentraut <redacted>
---
Looks quite straight-forward.

I wouldn't call our test cases "proving" anything, though.  The
reason we add tests is to make sure that others who touch the code
later will not break the feature you add today by documenting the
behaviour we expect out of our code.
quoted hunk
diff --git a/t/t5521-pull-options.sh b/t/t5521-pull-options.sh
index 1b06691..aa31abe 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)
+'
Pulling twice is a good thing here, to see how it behaves when there
is something to be fetched, and when you are up to date.  I think it
is a good idea to add it to the normal 'pull -q' test.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help