summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f35f560)
raw | patch | inline | side by side (parent: f35f560)
author | Junio C Hamano <gitster@pobox.com> | |
Fri, 4 Apr 2008 06:01:47 +0000 (23:01 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 13 Apr 2008 02:41:29 +0000 (19:41 -0700) |
Just like --parents option shows the parents of commits, this shows the
children of commits.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
children of commits.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/rev-list-options.txt | patch | blob | history | |
builtin-rev-list.c | patch | blob | history |
index 2648a550850bf07128e4a0a14c82860d6bad17b8..e5823950e2a199a0ee4853147dd687d18f0c4387 100644 (file)
Print the parents of the commit.
+--children::
+
+ Print the children of the commit.
+
--timestamp::
Print the raw commit timestamp.
diff --git a/builtin-rev-list.c b/builtin-rev-list.c
index edc0bd35bb0e96a230284250dc4c40776cf7caac..9da2f76375ee0160a554d691c714446146e1b1cf 100644 (file)
--- a/builtin-rev-list.c
+++ b/builtin-rev-list.c
" --reverse\n"
" formatting output:\n"
" --parents\n"
+" --children\n"
" --objects | --objects-edge\n"
" --unpacked\n"
" --header | --pretty\n"
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(' ');