{"thread":{"id":"33186","subject":"[PATCH] pull: Apply -q and -v options to rebase mode as well","startedAt":"2013-03-15T02:26:08Z","lastAt":"2013-03-17T04:53:57Z","messageCount":2,"participants":["Peter Eisentraut","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"211341","messageId":"1363314368.14066.3.camel@vanquo.pezone.net","threadId":"33186","inReplyTo":null,"subject":"[PATCH] pull: Apply -q and -v options to rebase mode as well","fromName":"Peter Eisentraut","fromEmail":"peter@eisentraut.org","sentAt":"2013-03-15T02:26:08Z","receivedAt":"2013-03-15T02:26:08Z","isPatch":true,"sender":{"key":"peter@eisentraut.org","avatar":"https://avatars.githubusercontent.com/u/105543?v=4"},"body":"git pull passed -q and -v only to git merge, but they can be useful for\ngit rebase as well, so pass them there, too.  In particular, using -q\nshuts up the \"Already up-to-date.\" message.  Add test cases to prove it.\n\nSigned-off-by: Peter Eisentraut <peter@eisentraut.org>\n---\n git-pull.sh             |    2 +-\n t/t5521-pull-options.sh |   27 +++++++++++++++++++++++++++\n 2 files changed, 28 insertions(+), 1 deletion(-)\n\ndiff --git a/git-pull.sh b/git-pull.sh\nindex 266e682..5d97e97 100755\n--- a/git-pull.sh\n+++ b/git-pull.sh\n@@ -279,7 +279,7 @@ fi\n merge_name=$(git fmt-merge-msg $log_arg <\"$GIT_DIR/FETCH_HEAD\") || exit\n case \"$rebase\" in\n true)\n-\teval=\"git-rebase $diffstat $strategy_args $merge_args\"\n+\teval=\"git-rebase $diffstat $strategy_args $merge_args $verbosity\"\n \teval=\"$eval --onto $merge_head ${oldremoteref:-$merge_head}\"\n \t;;\n *)\ndiff --git a/t/t5521-pull-options.sh b/t/t5521-pull-options.sh\nindex 1b06691..aa31abe 100755\n--- a/t/t5521-pull-options.sh\n+++ b/t/t5521-pull-options.sh\n@@ -19,6 +19,17 @@ test_expect_success 'git pull -q' '\n \ttest ! -s out)\n '\n \n+test_expect_success 'git pull -q --rebase' '\n+\tmkdir clonedqrb &&\n+\t(cd clonedqrb && git init &&\n+\tgit pull -q --rebase \"../parent\" >out 2>err &&\n+\ttest ! -s err &&\n+\ttest ! -s out &&\n+\tgit pull -q --rebase \"../parent\" >out 2>err &&\n+\ttest ! -s err &&\n+\ttest ! -s out)\n+'\n+\n test_expect_success 'git pull' '\n \tmkdir cloned &&\n \t(cd cloned && git init &&\n@@ -27,6 +38,14 @@ test_expect_success 'git pull' '\n \ttest ! -s out)\n '\n \n+test_expect_success 'git pull --rebase' '\n+\tmkdir clonedrb &&\n+\t(cd clonedrb && git init &&\n+\tgit pull --rebase \"../parent\" >out 2>err &&\n+\ttest -s err &&\n+\ttest ! -s out)\n+'\n+\n test_expect_success 'git pull -v' '\n \tmkdir clonedv &&\n \t(cd clonedv && git init &&\n@@ -35,6 +54,14 @@ test_expect_success 'git pull -v' '\n \ttest ! -s out)\n '\n \n+test_expect_success 'git pull -v --rebase' '\n+\tmkdir clonedvrb &&\n+\t(cd clonedvrb && git init &&\n+\tgit pull -v --rebase \"../parent\" >out 2>err &&\n+\ttest -s err &&\n+\ttest ! -s out)\n+'\n+\n test_expect_success 'git pull -v -q' '\n \tmkdir clonedvq &&\n \t(cd clonedvq && git init &&\n-- \n1.7.10.4\n"},{"id":"211482","messageId":"7vip4qtymy.fsf@alter.siamese.dyndns.org","threadId":"33186","inReplyTo":"1363314368.14066.3.camel@vanquo.pezone.net","subject":"Re: [PATCH] pull: Apply -q and -v options to rebase mode as well","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-03-17T04:53:57Z","receivedAt":"2013-03-17T04:53:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Peter Eisentraut <peter@eisentraut.org> writes:\n\n> git pull passed -q and -v only to git merge, but they can be useful for\n> git rebase as well, so pass them there, too.  In particular, using -q\n> shuts up the \"Already up-to-date.\" message.  Add test cases to prove it.\n>\n> Signed-off-by: Peter Eisentraut <peter@eisentraut.org>\n> ---\n\nLooks quite straight-forward.\n\nI wouldn't call our test cases \"proving\" anything, though.  The\nreason we add tests is to make sure that others who touch the code\nlater will not break the feature you add today by documenting the\nbehaviour we expect out of our code.\n\n> diff --git a/t/t5521-pull-options.sh b/t/t5521-pull-options.sh\n> index 1b06691..aa31abe 100755\n> --- a/t/t5521-pull-options.sh\n> +++ b/t/t5521-pull-options.sh\n> @@ -19,6 +19,17 @@ test_expect_success 'git pull -q' '\n>  \ttest ! -s out)\n>  '\n>  \n> +test_expect_success 'git pull -q --rebase' '\n> +\tmkdir clonedqrb &&\n> +\t(cd clonedqrb && git init &&\n> +\tgit pull -q --rebase \"../parent\" >out 2>err &&\n> +\ttest ! -s err &&\n> +\ttest ! -s out &&\n> +\tgit pull -q --rebase \"../parent\" >out 2>err &&\n> +\ttest ! -s err &&\n> +\ttest ! -s out)\n> +'\n\nPulling twice is a good thing here, to see how it behaves when there\nis something to be fetched, and when you are up to date.  I think it\nis a good idea to add it to the normal 'pull -q' test.\n\nThanks.\n"}]}