summaryrefslogtreecommitdiff
path: root/builtin-rev-list.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-rev-list.c')
-rw-r--r--builtin-rev-list.c29
1 files changed, 11 insertions, 18 deletions
diff --git a/builtin-rev-list.c b/builtin-rev-list.c
index 39ec61c..893762c 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(' ');
@@ -565,23 +575,6 @@ static struct commit_list *find_bisection(struct commit_list *list,
return best;
}
-static void read_revisions_from_stdin(struct rev_info *revs)
-{
- char line[1000];
-
- while (fgets(line, sizeof(line), stdin) != NULL) {
- int len = strlen(line);
- if (len && line[len - 1] == '\n')
- line[--len] = 0;
- if (!len)
- break;
- if (line[0] == '-')
- die("options not supported in --stdin mode");
- if (handle_revision_arg(line, revs, 0, 1))
- die("bad revision '%s'", line);
- }
-}
-
int cmd_rev_list(int argc, const char **argv, const char *prefix)
{
struct commit_list *list;