Jonathan Nieder <jrnieder@xxxxxxxxx> writes: > 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 > ' Isn't what the current code happens to do is the best we could do? We would end up showing one entry whose title appears to be "Signed-off-by: ..." in the shortlog output if we did so. If we added an empty line, then the shortlog output will have a single empty line that is equally unsightly. We could force a message like this: tree d7f87518a26e9f00714675706f165b94f3625177 parent f459a4b602c0f4d371e1717572de6d0c4d39c6b1 author Junio C Hamano <gitster@xxxxxxxxx> 1360699963 -0800 committer Junio C Hamano <gitster@xxxxxxxxx> 1360699980 -0800 !!cherry-picked from a commit without any message!! Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx> but I do not think that buys us much; it only replaces a totally uninformative empty line with another totally uninformative junk. That ugliness is a price the insane person, who is cherry picking a commit without any justification made by another insane person, indicates that he is willing to pay by doing so. At that point I do not think we should care. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html