]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jc/leftright'
authorJunio C Hamano <junkio@cox.net>
Wed, 20 Dec 2006 22:20:17 +0000 (14:20 -0800)
committerJunio C Hamano <junkio@cox.net>
Wed, 20 Dec 2006 22:20:17 +0000 (14:20 -0800)
* jc/leftright:
  Revert "Make left-right automatic."
  Make left-right automatic.
  Teach all of log family --left-right output.
  rev-list --left-right

1  2 
revision.c

diff --combined revision.c
index 7b6f91f83ef4a04f1af74daf37fbae2da7eac0d7,d84f46e5a663a61c05354abbffaf05feee991cb6..4dae5342eb6e14758c93fa4b2942d7c053111d04
@@@ -6,6 -6,7 +6,6 @@@
  #include "diff.h"
  #include "refs.h"
  #include "revision.h"
 -#include <regex.h>
  #include "grep.h"
  
  static char *path_name(struct name_path *path, const char *name)
@@@ -343,6 -344,7 +343,7 @@@ static void try_to_simplify_commit(stru
  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;
        if (revs->no_walk)
                return;
  
+       left_flag = (commit->object.flags & SYMMETRIC_LEFT);
        parent = commit->parents;
        while (parent) {
                struct commit *p = parent->item;
                parent = parent->next;
  
                parse_commit(p);
+               p->object.flags |= left_flag;
                if (p->object.flags & SEEN)
                        continue;
                p->object.flags |= SEEN;
@@@ -639,7 -643,7 +642,7 @@@ int handle_revision_arg(const char *arg
                                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 -853,10 +852,10 @@@ int setup_revisions(int argc, const cha
                                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;