From 577ed5c20b4ca374626c104f90c88550cf415067 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 22 Oct 2006 17:32:47 -0700 Subject: rev-list --left-right The output from "symmetric diff", i.e. A...B, does not distinguish between commits that are reachable from A and the ones that are reachable from B. In this picture, such a symmetric diff includes commits marked with a and b. x---b---b branch B / \ / / . / / \ o---x---a---a branch A However, you cannot tell which ones are 'a' and which ones are 'b' from the output. Sometimes this is frustrating. This adds an output option, --left-right, to rev-list. rev-list --left-right A...B would show ones reachable from A prefixed with '<' and the ones reachable from B prefixed with '>'. When combined with --boundary, boundary commits (the ones marked with 'x' in the above picture) are shown with prefix '-', so you would see list that looks like this: git rev-list --left-right --boundary --pretty=oneline A...B >bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 3rd on b >bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 2nd on b --- revision.h | 1 + 1 file changed, 1 insertion(+) (limited to 'revision.h') diff --git a/revision.h b/revision.h index 3adab9590a..f92a4d4375 100644 --- a/revision.h +++ b/revision.h @@ -9,6 +9,7 @@ #define BOUNDARY (1u<<5) #define BOUNDARY_SHOW (1u<<6) #define ADDED (1u<<7) /* Parents already parsed and added? */ +#define SYMMETRIC_LEFT (1u<<8) struct rev_info; struct log_info; -- cgit v1.2.1 From 74bd9029732db28b2fff50de0a190229c6033e02 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 16 Dec 2006 15:31:25 -0800 Subject: Teach all of log family --left-right output. This makes reviewing git log --left-right --merge --no-merges -p a lot more pleasant. Signed-off-by: Junio C Hamano --- revision.h | 1 + 1 file changed, 1 insertion(+) (limited to 'revision.h') diff --git a/revision.h b/revision.h index f92a4d4375..4585463a44 100644 --- a/revision.h +++ b/revision.h @@ -41,6 +41,7 @@ struct rev_info { limited:1, unpacked:1, /* see also ignore_packed below */ boundary:1, + left_right:1, parents:1; /* Diff flags */ -- cgit v1.2.1 From 5761231975ceffa531d86d9bab0f9a9a370674f6 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 16 Dec 2006 16:07:20 -0800 Subject: Make left-right automatic. When using symmetric differences, I think the user almost always would want to know which side of the symmetry each commit came from. So this removes --left-right option from the command line, and turns it on automatically when a symmetric difference is used ("git log --merge" counts as a symmetric difference between HEAD and MERGE_HEAD). Just in case, a new option --no-left-right is provided to defeat this, but I do not know if it would be useful. Signed-off-by: Junio C Hamano --- revision.h | 1 + 1 file changed, 1 insertion(+) (limited to 'revision.h') diff --git a/revision.h b/revision.h index 4585463a44..b2ab81488c 100644 --- a/revision.h +++ b/revision.h @@ -41,6 +41,7 @@ struct rev_info { limited:1, unpacked:1, /* see also ignore_packed below */ boundary:1, + no_left_right:1, left_right:1, parents:1; -- cgit v1.2.1 From 8dce82356221df894a1b0dd5a4189ad3169a5069 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 19 Dec 2006 02:28:16 -0800 Subject: Revert "Make left-right automatic." This reverts commit 5761231975ceffa531d86d9bab0f9a9a370674f6. Feeding symmetric difference to gitk is so useful, and it is the same for other graphical Porcelains. Rather than forcing them to pass --no-left-right, making it optional. Noticed and reported by Jeff King. --- revision.h | 1 - 1 file changed, 1 deletion(-) (limited to 'revision.h') diff --git a/revision.h b/revision.h index b2ab81488c..4585463a44 100644 --- a/revision.h +++ b/revision.h @@ -41,7 +41,6 @@ struct rev_info { limited:1, unpacked:1, /* see also ignore_packed below */ boundary:1, - no_left_right:1, left_right:1, parents:1; -- cgit v1.2.1 From d5db6c9ee79cfa1794d75847b8376430f08b203f Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 19 Dec 2006 18:25:32 -0800 Subject: revision: --skip= This adds --skip= option to revision traversal machinery. Documentation and test were added by Robert Fitzsimons. Signed-off-by: Robert Fitzsimons Signed-off-by: Junio C Hamano --- revision.h | 1 + 1 file changed, 1 insertion(+) (limited to 'revision.h') diff --git a/revision.h b/revision.h index 3adab9590a..81f522c35d 100644 --- a/revision.h +++ b/revision.h @@ -75,6 +75,7 @@ struct rev_info { struct grep_opt *grep_filter; /* special limits */ + int skip_count; int max_count; unsigned long max_age; unsigned long min_age; -- cgit v1.2.1