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

[PATCH] Document --left-right option to rev-list.

From
Brian Gernhardt <benji@silverinsanity.com>
Date
Apr 5, 2007, 14:53 UTC
Message-ID
<20070405145307.GA18458@174.242.249.10.in-addr.arpa>
In-Reply-To
<7vwt0rqftv.fsf@assigned-by-dhcp.cox.net>

Explanation is paraphrased from "577ed5c... rev-list --left-right" ---

Junio C Hamano <junkio@cox.net> writes:
Show 6 quoted lines
> David Kågedal <davidk@lysator.liu.se> writes:
>
>> "git log -Sleft-right" will actually give me the documentation I want,
>> since the docs are written but only put in the commit message.
>
> Fair enough.  Perhaps the list can help out ;-).
Like this?  :-)
 Documentation/git-rev-list.txt |   19 +++++++++++++++++++
 builtin-rev-list.c             |    1 +
 2 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/Documentation/git-rev-list.txt b/Documentation/git-rev-list.txt
index 3fa45b8..5b33865 100644
--- a/Documentation/git-rev-list.txt
+++ b/Documentation/git-rev-list.txt
@@ -21,6 +21,7 @@ SYNOPSIS
 	     [ \--stdin ]
 	     [ \--topo-order ]
 	     [ \--parents ]
+	     [ \--left-right ]
 	     [ \--encoding[=<encoding>] ]
 	     [ \--(author|committer|grep)=<pattern> ]
 	     [ [\--objects | \--objects-edge] [ \--unpacked ] ]
@@ -101,6 +102,24 @@ include::pretty-formats.txt[]
 
 	Print the parents of the commit.
 
+--left-right::
+
+	Mark which side of a symmetric diff a commit is reachable from.
+	Commits from the left side are prefixed with `<` and those from
+	the right with `>`.  If combined with `--boundary`, those
+	commits are prefixed with `-`.  For example:
+
+-----------------------------------------------------------------------
+	$ git rev-list --left-right --boundary --pretty=oneline A...B
+
+	>bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 3rd on b
+	>bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 2nd on b
+	<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 3rd on a
+	<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 2nd on a
+	-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1st on b
+	-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1st on a
+-----------------------------------------------------------------------
+
 Diff Formatting
 ~~~~~~~~~~~~~~~
 
diff --git a/builtin-rev-list.c b/builtin-rev-list.c
index f91685a..09774f9 100644
--- a/builtin-rev-list.c
+++ b/builtin-rev-list.c
@@ -35,6 +35,7 @@ static const char rev_list_usage[] =
 "    --header | --pretty\n"
 "    --abbrev=nr | --no-abbrev\n"
 "    --abbrev-commit\n"
+"    --left-right\n"
 "  special purpose:\n"
 "    --bisect\n"
 "    --bisect-vars"
-- 
1.5.1.32.gdd6cd
Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 19 in “How can I easily verify my diffs are in parent branch?”
  1. Alex BenneeApr 4, 2007
  2. Alex RiesenApr 4, 2007
  3. Andy ParkinsApr 4, 2007
  4. Linus TorvaldsApr 4, 2007
  5. Junio C HamanoApr 5, 2007
  6. David KågedalApr 5, 2007
  7. Junio C HamanoApr 5, 2007
  8. Document --left-right option to rev-list.Brian Gernhardt, Apr 5, 2007
  9. Junio C HamanoApr 5, 2007
  10. Alex RiesenApr 7, 2007
  11. 1/2 git-log --cherry-pickJunio C Hamano, Apr 9, 2007
  12. 1/4 Add %m to '--pretty=format:'Junio C Hamano, Apr 10, 2007
  13. 2/4 Refactor patch-id filtering out of git-cherry and git-format-patch.Junio C Hamano, Apr 10, 2007
  14. Johannes SchindelinApr 14, 2007
  15. 3/4 git-log --cherry-pick A...BJunio C Hamano, Apr 10, 2007
  16. 4/4 Documentation: --cherry-pickJunio C Hamano, Apr 10, 2007
  17. 2/2 Add %m to '--pretty=format:'Junio C Hamano, Apr 9, 2007
  18. Alex BenneeApr 11, 2007
  19. Linus TorvaldsApr 11, 2007

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.