From: Junio C Hamano Date: Tue, 8 Jul 2008 22:25:44 +0000 (-0700) Subject: Merge branch 'jc/blame' (early part) into HEAD X-Git-Tag: v1.6.0-rc0~66^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8bb65883d164843d5bb7475281af09bae18ab22d;p=thirdparty%2Fgit.git Merge branch 'jc/blame' (early part) into HEAD * '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 --- 8bb65883d164843d5bb7475281af09bae18ab22d diff --cc Documentation/rev-list-options.txt index 37dd1d61ea,e5823950e2..b6f5d87e72 --- a/Documentation/rev-list-options.txt +++ b/Documentation/rev-list-options.txt @@@ -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 b451f6c64d,5c7546db25..cf41511c79 --- a/builtin-blame.c +++ b/builtin-blame.c @@@ -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; diff --cc revision.c index fc66755259,979241eb0d..5a1a948a41 --- a/revision.c +++ b/revision.c @@@ -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)); } + static inline int want_ancestry(struct rev_info *revs) + { - return (revs->parents || revs->children.name); ++ return (revs->rewrite_parents || revs->children.name); + } + enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit) { if (commit->object.flags & SHOWN)