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

        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.

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to