Re: How can I easily verify my diffs are in parent branch?

4 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: How can I easily verify my diffs are in parent branch?

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:03

David Kågedal [off-list ref] writes:
Junio C Hamano [off-list ref] writes:
quoted
I think we should be able to use --left-right and ... operator
to express what the above cherry does with something like:

    $ git log --left-right --ignore-common-patch cvs-upstream...my-branch
--left-right is not documented, so I think it's hard for people (for
me at least) to follow your reasoning.

Would it be to much to ask for to want to have all options have some
kind of documentation?
Not at all.  I often wish that ;-)
As in not accepting patches for new options
that don't include documentation?

"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 ;-).

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

From: Brian Gernhardt <hidden>
Date: 2016-06-15 22:43:03

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

Junio C Hamano [off-list ref] writes:
David KÃ¥gedal [off-list ref] writes:
quoted
"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

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:03

Thanks.

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

From: Alex Riesen <hidden>
Date: 2016-06-15 22:43:03

On 4/5/07, Brian Gernhardt [off-list ref] wrote:
+--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:
"If combined with '--boundary', the boundary commits will be also printed
and prefixed with '-'."

Otherwise it is a bit unclear what commits are prefixed with '-': the left,
the right, or the boundary.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help