From: Brandon Casey Date: Sun, 27 Jan 2013 23:33:33 GMT Subject: Re: [PATCH v2 03/10] t/t3511: add some tests of 'cherry-pick -s' functionality Message-ID: In-Reply-To: <20130122081758.GD6085@elie.Belkin> On Tue, Jan 22, 2013 at 12:17 AM, Jonathan Nieder wrote: > Brandon Casey wrote: > >> --- /dev/null >> +++ b/t/t3511-cherry-pick-x.sh > [...] >> +test_expect_failure 'cherry-pick -s inserts blank line after non-conforming footer' ' > > IIUC this is an illustration of false-positives from messages like > this one: > > base: do something great without a sign-off > > If he does that, it will be the best thing in the > world: or so I think. > > A worthy cause. Could the example broken message be tweaked to > emphasize that use case? With the current example, I'd consider > either result (blank line or no blank line) to be ok behavior by git. The primary motivation for this test was to exercise an existing behavior which fails to append a newline and sob if the last line of the last paragraph matches the sob of the committer regardless of whether the entire paragraph would be interpreted as a conforming footer. Your example is tested as a side-effect of that. I'll tweak the string so it looks like this: The signed-off-by string should begin with the words Signed-off-by followed by a colon and space, and then the signers name and email address. e.g. Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> > [...] >> +test_expect_success 'cherry-pick -s refrains from adding duplicate trailing sob' ' > > And the other side of basic "-s" functionality. > > One more test would be interesting: what does "-s" do when asked to > produce a duplicate signoff with an interspersed signoff by someone else? > > test: a patch with a more complicated life > > This patch bounced from $GIT_COMMITTER_NAME to Ms. Thor for > tweaking, then back to $GIT_COMMITTER_NAME who will be > recording it in permanent history. > > Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>" > Signed-off-by: A U Thor This one exists as "adds sob when last sob doesn't match committer". In this case an additional sob should be appended to the footer. -Brandon