Code

Merge branch 'lt/rev-list-interactive'
authorJunio C Hamano <gitster@pobox.com>
Mon, 19 Nov 2007 00:03:24 +0000 (16:03 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 19 Nov 2007 00:03:24 +0000 (16:03 -0800)
* lt/rev-list-interactive:
  Fix parent rewriting in --early-output
  revision walker: mini clean-up
  Enhance --early-output format
  Add "--early-output" log flag for interactive GUI use
  Simplify topo-sort logic

1  2 
builtin-log.c
builtin-rev-list.c
commit.c
revision.c

diff --cc builtin-log.c
Simple merge
Simple merge
diff --cc commit.c
index b5092658724e2172abdf54a1af6d91bda0e176da,ab4eb8bdd101d9a06dd408a7903c2c620d109dbc..f074811edc8c5ba41351f50c48a6cda7614e8f8e
+++ b/commit.c
@@@ -8,24 -9,48 +8,8 @@@
  
  int save_commit_buffer = 1;
  
- struct sort_node
- {
-       /*
-        * the number of children of the associated commit
-        * that also occur in the list being sorted.
-        */
-       unsigned int indegree;
-       /*
-        * reference to original list item that we will re-use
-        * on output.
-        */
-       struct commit_list * list_item;
- };
  const char *commit_type = "commit";
  
 -static struct cmt_fmt_map {
 -      const char *n;
 -      size_t cmp_len;
 -      enum cmit_fmt v;
 -} cmt_fmts[] = {
 -      { "raw",        1,      CMIT_FMT_RAW },
 -      { "medium",     1,      CMIT_FMT_MEDIUM },
 -      { "short",      1,      CMIT_FMT_SHORT },
 -      { "email",      1,      CMIT_FMT_EMAIL },
 -      { "full",       5,      CMIT_FMT_FULL },
 -      { "fuller",     5,      CMIT_FMT_FULLER },
 -      { "oneline",    1,      CMIT_FMT_ONELINE },
 -      { "format:",    7,      CMIT_FMT_USERFORMAT},
 -};
 -
 -static char *user_format;
 -
 -enum cmit_fmt get_commit_format(const char *arg)
 -{
 -      int i;
 -
 -      if (!arg || !*arg)
 -              return CMIT_FMT_DEFAULT;
 -      if (*arg == '=')
 -              arg++;
 -      if (!prefixcmp(arg, "format:")) {
 -              if (user_format)
 -                      free(user_format);
 -              user_format = xstrdup(arg + 7);
 -              return CMIT_FMT_USERFORMAT;
 -      }
 -      for (i = 0; i < ARRAY_SIZE(cmt_fmts); i++) {
 -              if (!strncmp(arg, cmt_fmts[i].n, cmt_fmts[i].cmp_len) &&
 -                  !strncmp(arg, cmt_fmts[i].n, strlen(arg)))
 -                      return cmt_fmts[i].v;
 -      }
 -
 -      die("invalid --pretty format: %s", arg);
 -}
 -
  static struct commit *check_commit(struct object *obj,
                                   const unsigned char *sha1,
                                   int quiet)
diff --cc revision.c
index f5b0e83ee35146a2cae9b71a9914bd818268d4ac,5796153bbd0b01f94a9c33be16c3bccab86a19a5..8f0287fcc0ff4409afa1c16774cfb6086c48ae8f
@@@ -1251,8 -1281,8 +1281,8 @@@ int setup_revisions(int argc, const cha
        if (revs->prune_data) {
                diff_tree_setup_paths(revs->prune_data, &revs->pruning);
                /* Can't prune commits with rename following: the paths change.. */
 -              if (!revs->diffopt.follow_renames)
 +              if (!DIFF_OPT_TST(&revs->diffopt, FOLLOW_RENAMES))
-                       revs->prune_fn = try_to_simplify_commit;
+                       revs->prune = 1;
                if (!revs->full_diff)
                        diff_tree_setup_paths(revs->prune_data, &revs->diffopt);
        }