diff options
Diffstat (limited to 'builtin-rev-list.c')
-rw-r--r-- | builtin-rev-list.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/builtin-rev-list.c b/builtin-rev-list.c index 54b6672969..8e1720c45b 100644 --- a/builtin-rev-list.c +++ b/builtin-rev-list.c @@ -17,7 +17,7 @@ #define COUNTED (1u<<16) static const char rev_list_usage[] = -"git-rev-list [OPTION] <commit-id>... [ -- paths... ]\n" +"git rev-list [OPTION] <commit-id>... [ -- paths... ]\n" " limiting output:\n" " --max-count=nr\n" " --max-age=epoch\n" @@ -37,6 +37,7 @@ static const char rev_list_usage[] = " --reverse\n" " formatting output:\n" " --parents\n" +" --children\n" " --objects | --objects-edge\n" " --unpacked\n" " --header | --pretty\n" @@ -90,6 +91,15 @@ static void show_commit(struct commit *commit) parents = parents->next; } } + if (revs.children.name) { + struct commit_list *children; + + children = lookup_decoration(&revs.children, &commit->object); + while (children) { + printf(" %s", sha1_to_hex(children->item->object.sha1)); + children = children->next; + } + } show_decorations(commit); if (revs.commit_format == CMIT_FMT_ONELINE) putchar(' '); |