git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 00/11] alternative unify appending of sob

From
Brandon Casey <drafnel@gmail.com>
Date
Nov 26, 2012, 01:45 UTC
Message-ID
<1353894359-6733-1-git-send-email-drafnel@gmail.com>
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
Next: Brandon Casey
Message 1 of 18 in “alternative unify appending of sob”
  1. 00/11 alternative unify appending of sobBrandon Casey, Nov 26, 2012
  2. 01/11 sequencer.c: remove broken support for rfc2822 continuation in footerBrandon Casey, Nov 26, 2012
  3. 02/11 t/test-lib-functions.sh: allow to specify the tag name to test_commitBrandon Casey, Nov 26, 2012
  4. 03/11 t/t3511: add some tests of 'cherry-pick -s' functionalityBrandon Casey, Nov 26, 2012
  5. 04/11 sequencer.c: recognize "(cherry picked from ..." as part of s-o-b footerBrandon Casey, Nov 26, 2012
  6. Junio C HamanoNov 29, 2012
  7. Brandon CaseyNov 29, 2012
  8. 05/11 sequencer.c: always separate "(cherry picked from" from commit bodyBrandon Casey, Nov 26, 2012
  9. 06/11 sequencer.c: teach append_signoff how to detect duplicate s-o-bBrandon Casey, Nov 26, 2012
  10. Junio C HamanoNov 29, 2012
  11. 07/11 sequencer.c: teach append_signoff to avoid adding a duplicate newlineBrandon Casey, Nov 26, 2012
  12. 08/11 t4014: more tests about appending s-o-b linesBrandon Casey, Nov 26, 2012
  13. 09/11 format-patch: stricter S-o-b detectionBrandon Casey, Nov 26, 2012
  14. 10/11 format-patch: update append_signoff prototypeBrandon Casey, Nov 26, 2012
  15. 11/11 Unify appending signoff in format-patch, commit and sequencerBrandon Casey, Nov 26, 2012
  16. Nguyen Thai Ngoc DuyNov 26, 2012
  17. Junio C HamanoNov 29, 2012
  18. Junio C HamanoNov 26, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.