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

[PATCHv2 0/9] --left/right-only and --cherry-mark

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Mar 7, 2011, 12:31 UTC
Message-ID
<cover.1299499429.git.git@drmicha.warpmail.net>

This is a replacement for mg/rev-list-one-side-only in pu. The --left/right-only related commits (1-4/9) are unchanged.

5/9 is new and refactors the generation of commit marks (<>-) which we currently do in 5 places, to ease maintenance and extensibility.

6,7 are new and introduce "--cherry-mark" to the revision walker which marks those commits which "--cherry-pick" would omit.

8,9 are amended as compared to pu, introducing "--cherry" as a shortcut for "--cherry-mark --right-only --no-merges" to produce output much like "git cherry" with the full flexibility of rev-list/log. (We could use the previous version instead, or with a different synonym; or introduce rev-list-option aliases...)

The mark for patch-equivalent commits is '=' because git-cherry's '-' is used for boundary commits already.

The mark for non-equivalent commits is '+' (following git-cherry), or '<'/'>' with --left-right, or '*' with --graph.

This is up for bike-shed^W^Wdiscussing - we could use ' ' instead or even '*' also without --graph, or '+' even with --graph.

I would in fact prefer ' ' without --graph and '*' with --graph, which would make it even more different from git-cherry's output, though. (Personally, I never liked git-cherry's output anyways.)

This is also the base for refactoring git-format-patch and git-cherry, of course, where the latter would be helped if it's ok to change the output format.

Junio C Hamano (1):
  rev-list: --left/right-only are mutually exclusive
Michael J Gruber (8):
  revlist.c: introduce --left/right-only for unsymmetric picking
  t6007: Make sure we test --cherry-pick
  rev-list: documentation and test for --left/right-only
  rev-list/log: factor out revision mark generation
  revision.c: introduce --cherry-mark
  rev-list: documentation and test for --cherry-mark
  log --cherry: a synonym
  t6007: test rev-list --cherry
 Documentation/git-rev-list.txt       |    3 +
 Documentation/rev-list-options.txt   |   26 ++++++++
 builtin/rev-list.c                   |   14 +----
 graph.c                              |   17 +-----
 log-tree.c                           |   28 +-------
 pretty.c                             |    6 +--
 revision.c                           |   74 +++++++++++++++++++++-
 revision.h                           |    7 ++-
 t/t6007-rev-list-cherry-pick-file.sh |  113 +++++++++++++++++++++++++++++++---
 9 files changed, 220 insertions(+), 68 deletions(-)
-- 
1.7.4.1.299.g567d7.dirty
Next: Michael J Gruber
Message 1 of 30 in “[PATCHv2 0/9] --left/right-only and --cherry-mark”
  1. Michael J GruberMar 7, 2011
  2. 1/9 revlist.c: introduce --left/right-only for unsymmetric pickingMichael J Gruber, Mar 7, 2011
  3. 2/9 t6007: Make sure we test --cherry-pickMichael J Gruber, Mar 7, 2011
  4. 3/9 rev-list: documentation and test for --left/right-onlyMichael J Gruber, Mar 7, 2011
  5. 4/9 rev-list: --left/right-only are mutually exclusiveMichael J Gruber, Mar 7, 2011
  6. 5/9 rev-list/log: factor out revision mark generationMichael J Gruber, Mar 7, 2011
  7. 6/9 revision.c: introduce --cherry-markMichael J Gruber, Mar 7, 2011
  8. Junio C HamanoMar 9, 2011
  9. 6/9 revision.c: introduce --cherry-markMichael J Gruber, Mar 10, 2011
  10. 7/9 rev-list: documentation and test for --cherry-markMichael J Gruber, Mar 7, 2011
  11. 8/9 log --cherry: a synonymMichael J Gruber, Mar 7, 2011
  12. 9/9 t6007: test rev-list --cherryMichael J Gruber, Mar 7, 2011
  13. Junio C HamanoMar 9, 2011
  14. Michael J GruberMar 10, 2011
  15. Junio C HamanoMar 10, 2011
  16. Michael J GruberMar 10, 2011
  17. 00/10 --left/right-only and --cherry-markMichael J Gruber, Mar 10, 2011
  18. 01/10 revlist.c: introduce --left/right-only for unsymmetric pickingMichael J Gruber, Mar 10, 2011
  19. 02/10 t6007: Make sure we test --cherry-pickMichael J Gruber, Mar 10, 2011
  20. 03/10 rev-list: documentation and test for --left/right-onlyMichael J Gruber, Mar 10, 2011
  21. 04/10 rev-list: --left/right-only are mutually exclusiveMichael J Gruber, Mar 10, 2011
  22. 05/10 rev-list/log: factor out revision mark generationMichael J Gruber, Mar 10, 2011
  23. 06/10 revision.c: introduce --cherry-markMichael J Gruber, Mar 10, 2011
  24. 07/10 rev-list: documentation and test for --cherry-markMichael J Gruber, Mar 10, 2011
  25. 08/10 log --cherry: a synonymMichael J Gruber, Mar 10, 2011
  26. 09/10 t6007: test rev-list --cherryMichael J Gruber, Mar 10, 2011
  27. 10/10 git-log: put space after commit markMichael J Gruber, Mar 10, 2011
  28. Junio C HamanoMar 10, 2011
  29. Michael J GruberMar 11, 2011
  30. Junio C HamanoMar 11, 2011

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.