Code

Merge branch 'jc/blame' (early part) into HEAD
authorJunio C Hamano <gitster@pobox.com>
Tue, 8 Jul 2008 22:25:44 +0000 (15:25 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 8 Jul 2008 22:25:44 +0000 (15:25 -0700)
* 'jc/blame' (early part):
  git-blame --reverse
  builtin-blame.c: allow more than 16 parents
  builtin-blame.c: move prepare_final() into a separate function.
  rev-list --children
  revision traversal: --children option

Conflicts:

Documentation/rev-list-options.txt
revision.c

1  2 
Documentation/rev-list-options.txt
builtin-blame.c
builtin-rev-list.c
revision.c
revision.h

index 37dd1d61ea36d7afb1e1b16cc46bee0d357ad1c8,e5823950e2a199a0ee4853147dd687d18f0c4387..b6f5d87e723bec4f00a3929274c43bfd478cc083
@@@ -45,10 -42,12 +45,14 @@@ endif::git-rev-list[
  
        Print the parents of the commit.
  
+ --children::
+       Print the children of the commit.
 +ifdef::git-rev-list[]
  --timestamp::
        Print the raw commit timestamp.
 +endif::git-rev-list[]
  
  --left-right::
  
diff --cc builtin-blame.c
index b451f6c64dde8ce6358bb5c8dfccc8bad181a6bb,5c7546db2514742851b405481373add26018756a..cf41511c798330a7e0ec02db5785747ad2b662a5
@@@ -2003,9 -2038,13 +2038,13 @@@ static int git_blame_config(const char 
                blank_boundary = git_config_bool(var, value);
                return 0;
        }
 -      return git_default_config(var, value);
 +      return git_default_config(var, value, cb);
  }
  
+ /*
+  * Prepare a dummy commit that represents the work tree (or staged) item.
+  * Note that annotating work tree item never works in the reverse.
+  */
  static struct commit *fake_working_tree_commit(const char *path, const char *contents_from)
  {
        struct commit *commit;
Simple merge
diff --cc revision.c
index fc667552592daa3c894d0df4e97469d1809dbf27,979241eb0dd7a3fe0123c2c9af9c06ad77d3ac52..5a1a948a41e8f2ae2df01c0a61d2e228cc79caab
@@@ -1406,16 -1401,8 +1412,18 @@@ int setup_revisions(int argc, const cha
  
        if (revs->reverse && revs->reflog_info)
                die("cannot combine --reverse with --walk-reflogs");
 -      if (revs->parents && revs->children.name)
++      if (revs->rewrite_parents && revs->children.name)
+               die("cannot combine --parents and --children");
 +
 +      /*
 +       * Limitations on the graph functionality
 +       */
 +      if (revs->reverse && revs->graph)
 +              die("cannot combine --reverse with --graph");
 +
 +      if (revs->reflog_info && revs->graph)
 +              die("cannot combine --walk-reflogs with --graph");
 +
        return left;
  }
  
@@@ -1524,6 -1533,11 +1554,11 @@@ static int commit_match(struct commit *
                           commit->buffer, strlen(commit->buffer));
  }
  
 -      return (revs->parents || revs->children.name);
+ static inline int want_ancestry(struct rev_info *revs)
+ {
++      return (revs->rewrite_parents || revs->children.name);
+ }
  enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit)
  {
        if (commit->object.flags & SHOWN)
diff --cc revision.h
Simple merge