X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=log-tree.c;h=e7694a3a4ca2e6de7fe8f3b5458eb2b65591373a;hb=dbdc07fcbe3a951df8a3869b42edb6fffd466486;hp=24c295ea1dc91180b9685299f48812593162bdfe;hpb=916034b93ce45bdedfb1c5cef270e6eba2a26fea;p=git.git diff --git a/log-tree.c b/log-tree.c index 24c295ea1..e7694a3a4 100644 --- a/log-tree.c +++ b/log-tree.c @@ -165,6 +165,14 @@ static void show_parents(struct commit *commit, int abbrev) } } +static void show_children(struct rev_info *opt, struct commit *commit, int abbrev) +{ + struct commit_list *p = lookup_decoration(&opt->children, &commit->object); + for ( ; p; p = p->next) { + printf(" %s", find_unique_abbrev(p->item->object.sha1, abbrev)); + } +} + void show_decorations(struct rev_info *opt, struct commit *commit) { const char *prefix; @@ -414,6 +422,8 @@ void show_log(struct rev_info *opt) fputs(find_unique_abbrev(commit->object.sha1, abbrev_commit), stdout); if (opt->print_parents) show_parents(commit, abbrev_commit); + if (opt->children.name) + show_children(opt, commit, abbrev_commit); show_decorations(opt, commit); if (opt->graph && !graph_is_commit_finished(opt->graph)) { putchar('\n'); @@ -473,6 +483,8 @@ void show_log(struct rev_info *opt) stdout); if (opt->print_parents) show_parents(commit, abbrev_commit); + if (opt->children.name) + show_children(opt, commit, abbrev_commit); if (parent) printf(" (from %s)", find_unique_abbrev(parent->object.sha1,