From: Jonathan Nieder Date: Tue, 12 Feb 2013 19:56:20 GMT Subject: Re: [PATCH/FYI v4 13/12] fixup! t/t3511: add some tests of 'cherry-pick -s' functionality Message-ID: <20130212195620.GB12240@google.com> In-Reply-To: <1360664260-11803-14-git-send-email-drafnel@gmail.com> Brandon Casey wrote: > I'm not sure we should apply this though. I'm leaning towards saying that > the 'cherry-pick -s' behavior with respect to a commit with an empty message > body should be undefined. If we want it to be undefined then we probably > shouldn't introduce a test which would have the effect of defining it. Maybe it would make sense to just check that cherry-pick doesn't segfault in this case? That is, compute the output but don't compare it to expected output, as in: test_expect_success 'adding signoff to empty message does something sane' ' git reset --hard HEAD^ && git cherry-pick --allow-empty-message -s empty-branch && git show --pretty=format:%B -s empty-branch >actual && # sign-off is included *somewhere* grep "^Signed-off-by:.*>\$" actual ' Alternatively, if there are only a few sane behaviors, a test can check for all of them and pass as long as git follows one. I haven't thought carefully enough about this example to suggest doing that. Thanks, Jonathan