git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/11] alternative unify appending of sob
@ 2012-11-26  1:45 Brandon Casey
  2012-11-26  1:45 ` [PATCH 01/11] sequencer.c: remove broken support for rfc2822 continuation in footer Brandon Casey
                   ` (12 more replies)
  0 siblings, 13 replies; 18+ messages in thread
From: Brandon Casey @ 2012-11-26  1:45 UTC (permalink / raw)
  To: git; +Cc: pclouds, gitster, Brandon Casey

From: Brandon Casey <bcasey@nvidia.com>

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

Brandon Casey (8):
  sequencer.c: remove broken support for rfc2822 continuation in footer
  t/test-lib-functions.sh: 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
    footer
  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/t3511-cherry-pick-x.sh | 219 +++++++++++++++++++++++++++++++++++++++
 t/t4014-format-patch.sh  | 262 +++++++++++++++++++++++++++++++++++++++++++++++
 t/test-lib-functions.sh  |   9 +-
 9 files changed, 580 insertions(+), 154 deletions(-)
 create mode 100755 t/t3511-cherry-pick-x.sh

-- 
1.8.0.284.g959048a

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2012-11-29  5:57 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-26  1:45 [PATCH 00/11] alternative unify appending of sob Brandon Casey
2012-11-26  1:45 ` [PATCH 01/11] sequencer.c: remove broken support for rfc2822 continuation in footer Brandon Casey
2012-11-26  1:45 ` [PATCH 02/11] t/test-lib-functions.sh: allow to specify the tag name to test_commit Brandon Casey
2012-11-26  1:45 ` [PATCH 03/11] t/t3511: add some tests of 'cherry-pick -s' functionality Brandon Casey
2012-11-26  1:45 ` [PATCH 04/11] sequencer.c: recognize "(cherry picked from ..." as part of s-o-b footer Brandon Casey
2012-11-29  0:02   ` Junio C Hamano
2012-11-29  1:28     ` Brandon Casey
2012-11-26  1:45 ` [PATCH 05/11] sequencer.c: always separate "(cherry picked from" from commit body Brandon Casey
2012-11-26  1:45 ` [PATCH 06/11] sequencer.c: teach append_signoff how to detect duplicate s-o-b Brandon Casey
2012-11-29  0:35   ` Junio C Hamano
2012-11-26  1:45 ` [PATCH 07/11] sequencer.c: teach append_signoff to avoid adding a duplicate newline Brandon Casey
2012-11-26  1:45 ` [PATCH 08/11] t4014: more tests about appending s-o-b lines Brandon Casey
2012-11-26  1:45 ` [PATCH 09/11] format-patch: stricter S-o-b detection Brandon Casey
2012-11-26  1:45 ` [PATCH 10/11] format-patch: update append_signoff prototype Brandon Casey
2012-11-26  1:45 ` [PATCH 11/11] Unify appending signoff in format-patch, commit and sequencer Brandon Casey
2012-11-26  7:56 ` [PATCH 00/11] alternative unify appending of sob Nguyen Thai Ngoc Duy
2012-11-29  5:56   ` Junio C Hamano
2012-11-26 22:00 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).