Re: [PATCH v3 04/11] t/t3511: add some tests of 'cherry-pick -s' functionality
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jan 28, 2013, 02:08 UTC
- Message-ID
- <20130128020810.GF8206@elie.Belkin>
- In-Reply-To
- <1359335515-13818-5-git-send-email-drafnel@gmail.com>
Brandon Casey wrote:
Show 15 quoted lines
> --- /dev/null
> +++ b/t/t3511-cherry-pick-x.sh
> @@ -0,0 +1,111 @@
> +#!/bin/sh
> +
> +test_description='Test cherry-pick -x and -s'
> +
> +. ./test-lib.sh
> +
> +pristine_detach () {
> + git cherry-pick --quit &&
> + git checkout -f "$1^0" &&
> + git read-tree -u --reset HEAD &&
> + git clean -d -f -f -q -x
> +}Some day this should move to test-lib-functions.sh. Not relevant for this patch, though.
[...]
Show 7 quoted lines
> +test_expect_failure 'cherry-pick -s inserts blank line after non-conforming footer' ' > + pristine_detach initial && > + git cherry-pick -s mesg-broken-footer && > + cat <<-EOF >expect && > + $mesg_broken_footer > + > + Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>
This bug is old. When c1e01b0c (commit: More generous accepting of RFC-2822 footer lines, 2009-10-28) added more precise parsing of the RFC2822 footer when deciding whether to add a newline before a new signoff, it forgot to change the "sign-off already present" case to match.
Thanks for the test. The rest of the tests in this file also look good, of course.
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>