rev-list --children
Just like --parents option shows the parents of commits, this shows the children of commits. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
f35f5603f4
commit
72276a3ecb
@ -42,6 +42,10 @@ format, often found in E-mail messages.
|
|||||||
|
|
||||||
Print the parents of the commit.
|
Print the parents of the commit.
|
||||||
|
|
||||||
|
--children::
|
||||||
|
|
||||||
|
Print the children of the commit.
|
||||||
|
|
||||||
--timestamp::
|
--timestamp::
|
||||||
Print the raw commit timestamp.
|
Print the raw commit timestamp.
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@ static const char rev_list_usage[] =
|
|||||||
" --reverse\n"
|
" --reverse\n"
|
||||||
" formatting output:\n"
|
" formatting output:\n"
|
||||||
" --parents\n"
|
" --parents\n"
|
||||||
|
" --children\n"
|
||||||
" --objects | --objects-edge\n"
|
" --objects | --objects-edge\n"
|
||||||
" --unpacked\n"
|
" --unpacked\n"
|
||||||
" --header | --pretty\n"
|
" --header | --pretty\n"
|
||||||
@ -84,6 +85,15 @@ static void show_commit(struct commit *commit)
|
|||||||
parents = parents->next;
|
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);
|
show_decorations(commit);
|
||||||
if (revs.commit_format == CMIT_FMT_ONELINE)
|
if (revs.commit_format == CMIT_FMT_ONELINE)
|
||||||
putchar(' ');
|
putchar(' ');
|
||||||
|
Loading…
Reference in New Issue
Block a user