Peter Eisentraut <pe...@eisentraut.org> 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 <pe...@eisentraut.org>
> ---

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.

> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to