Also, introduce --no-min-parents and --no-max-parents to do the obvious thing for convenience. Signed-off-by: Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx> --- builtin/rev-list.c | 2 ++ builtin/rev-parse.c | 2 ++ revision.c | 4 ++++ 3 files changed, 8 insertions(+), 0 deletions(-) diff --git a/builtin/rev-list.c b/builtin/rev-list.c index 7b276e0..9bfb942 100644 --- a/builtin/rev-list.c +++ b/builtin/rev-list.c @@ -17,7 +17,9 @@ static const char rev_list_usage[] = " --sparse\n" " --no-merges\n" " --min-parents=<n>\n" +" --no-min-parents\n" " --max-parents=<n>\n" +" --no-max-parents\n" " --remove-empty\n" " --all\n" " --branches\n" diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c index 9940546..adb1cae 100644 --- a/builtin/rev-parse.c +++ b/builtin/rev-parse.c @@ -49,7 +49,9 @@ static int is_rev_argument(const char *arg) "--min-age=", "--no-merges", "--min-parents=", + "--no-min-parents", "--max-parents=", + "--no-max-parents", "--objects", "--objects-edge", "--parents", diff --git a/revision.c b/revision.c index 8d48870..0f38364 100644 --- a/revision.c +++ b/revision.c @@ -1283,8 +1283,12 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg revs->max_parents = 1; } else if (!prefixcmp(arg, "--min-parents=")) { revs->min_parents = atoi(arg+14); + } else if (!prefixcmp(arg, "--no-min-parents")) { + revs->min_parents = 0; } else if (!prefixcmp(arg, "--max-parents=")) { revs->max_parents = atoi(arg+14); + } else if (!prefixcmp(arg, "--no-max-parents")) { + revs->max_parents = -1; } else if (!strcmp(arg, "--boundary")) { revs->boundary = 1; } else if (!strcmp(arg, "--left-right")) { -- 1.7.4.1.511.g72e46 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html