From: Junio C Hamano Date: Mon, 19 Nov 2007 00:03:24 +0000 (-0800) Subject: Merge branch 'lt/rev-list-interactive' X-Git-Tag: v1.5.4-rc0~185 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=761e8566cb072047e836f1d7f50d3c0f67d7eb00;p=git.git Merge branch 'lt/rev-list-interactive' * 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 --- 761e8566cb072047e836f1d7f50d3c0f67d7eb00 diff --cc commit.c index b50926587,ab4eb8bdd..f074811ed --- a/commit.c +++ 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 f5b0e83ee,5796153bb..8f0287fcc --- a/revision.c +++ b/revision.c @@@ -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); }