summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-12-20 22:20:17 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-12-20 22:20:17 (GMT)
commit63c4b4c5c1335cca263d7a9ab4e6cfe5fd03dfec (patch)
treef80ceee80d5a651285197295056038c86d24447e /revision.c
parente035ce939d7e26afee4936ed32f1db9428ac026e (diff)
parent8dce82356221df894a1b0dd5a4189ad3169a5069 (diff)
downloadgit-63c4b4c5c1335cca263d7a9ab4e6cfe5fd03dfec.zip
git-63c4b4c5c1335cca263d7a9ab4e6cfe5fd03dfec.tar.gz
git-63c4b4c5c1335cca263d7a9ab4e6cfe5fd03dfec.tar.bz2
Merge branch 'jc/leftright'
* jc/leftright: Revert "Make left-right automatic." Make left-right automatic. Teach all of log family --left-right output. rev-list --left-right
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/revision.c b/revision.c
index 7b6f91f..4dae534 100644
--- a/revision.c
+++ b/revision.c
@@ -343,6 +343,7 @@ static void try_to_simplify_commit(struct rev_info *revs, struct commit *commit)
static void add_parents_to_list(struct rev_info *revs, struct commit *commit, struct commit_list **list)
{
struct commit_list *parent = commit->parents;
+ unsigned left_flag;
if (commit->object.flags & ADDED)
return;
@@ -387,6 +388,7 @@ static void add_parents_to_list(struct rev_info *revs, struct commit *commit, st
if (revs->no_walk)
return;
+ left_flag = (commit->object.flags & SYMMETRIC_LEFT);
parent = commit->parents;
while (parent) {
struct commit *p = parent->item;
@@ -394,6 +396,7 @@ static void add_parents_to_list(struct rev_info *revs, struct commit *commit, st
parent = parent->next;
parse_commit(p);
+ p->object.flags |= left_flag;
if (p->object.flags & SEEN)
continue;
p->object.flags |= SEEN;
@@ -639,7 +642,7 @@ int handle_revision_arg(const char *arg, struct rev_info *revs,
add_pending_commit_list(revs, exclude,
flags_exclude);
free_commit_list(exclude);
- a->object.flags |= flags;
+ a->object.flags |= flags | SYMMETRIC_LEFT;
} else
a->object.flags |= flags_exclude;
b->object.flags |= flags;
@@ -849,6 +852,10 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
revs->boundary = 1;
continue;
}
+ if (!strcmp(arg, "--left-right")) {
+ revs->left_right = 1;
+ continue;
+ }
if (!strcmp(arg, "--objects")) {
revs->tag_objects = 1;
revs->tree_objects = 1;