From: Brandon Casey <>

I hate to have the battle of the patches, but I kinda prefer the
append_signoff code in sequencer.c over the code in log-tree.c as a
foundation to build on.

So, this series is similar to Duy's "unification" series, but it goes in the
opposite direction and builds on top of sequencer.c and additionally adds the
elements from my original series to treat the "(cherry picked from..." line
added by 'cherry-pick -x' in the same way that other footer elements are
treated (after addressing Junio's comments about rfc2822 continuation lines
and duplicate s-o-b's).

I've integrated Duy's series with a few minor tweaks.  I added a couple
of additional tests to t4014 and corrected one of the tests which had
incorrect behavior.  I think his sign-off's should still be valid, so I
kept them in.  Sorry that I've been slow, and now the two of us are stepping
on each other's toes, but Duy please take a look and let me know if there's
anything you dislike.

The main difference between this series and Duy's, aside from the change in
behavior with respect to a "(cherry picked from...)" line, is that the
detection of a s-o-b footer is done in a somewhat more generic way.  The
log-tree.c code expects to find something that looks like "[-A-Za-z]+:" on
the left-hand side, and something that looks like an email address on the
right-hand side.  The sequencer.c code relaxes this definition so that an
email address is not required on the right hand side.  This allows lines like
"Change-id: IXXXX" or "Bug: XXX" to be considered valid footer elements.

So, this series should result in s-o-b and "(cherry picked from...)" being
appended to commit messages in a more consistent and deterministic way.  For
example, the decision about whether to insert a blank line before appending
a s-o-b.  As discussed, cherry-pick and commit will only refrain from
appending a s-o-b if the committer's s-o-b appears as the last one in a
conforming footer, while format-patch will refrain from appending it if it
appears anywhere within the footer.


Brandon Casey (8):
  sequencer.c: remove broken support for rfc2822 continuation in footer
  t/ allow to specify the tag name to test_commit
  t/t3511: add some tests of 'cherry-pick -s' functionality
  sequencer.c: recognize "(cherry picked from ..." as part of s-o-b
  sequencer.c: always separate "(cherry picked from" from commit body
  sequencer.c: teach append_signoff how to detect duplicate s-o-b
  sequencer.c: teach append_signoff to avoid adding a duplicate newline
  Unify appending signoff in format-patch, commit and sequencer

Nguyễn Thái Ngọc Duy (3):
  t4014: more tests about appending s-o-b lines
  format-patch: stricter S-o-b detection
  format-patch: update append_signoff prototype

 builtin/commit.c         |   2 +-
 builtin/log.c            |  13 +--
 log-tree.c               |  92 ++---------------
 revision.h               |   2 +-
 sequencer.c              | 133 +++++++++++++++---------
 sequencer.h              |   2 +-
 t/ | 219 +++++++++++++++++++++++++++++++++++++++
 t/  | 262 +++++++++++++++++++++++++++++++++++++++++++++++
 t/  |   9 +-
 9 files changed, 580 insertions(+), 154 deletions(-)
 create mode 100755 t/


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