X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=rev-list.c;h=1bc1887fdbbf06400ba4ac23e272770f1608dbe1;hb=8233340ce6eb700eb2cd9c0fef4d1705997c499b;hp=45657552177a588a53ff77393c46094da2249798;hpb=3af06987eb3c376e2f1cc6dfa9c9c510b9e228cf;p=git.git diff --git a/rev-list.c b/rev-list.c index 45657552..1bc1887f 100644 --- a/rev-list.c +++ b/rev-list.c @@ -749,6 +749,11 @@ int main(int argc, const char **argv) struct commit *commit; unsigned char sha1[20]; + /* accept -, like traditilnal "head" */ + if ((*arg == '-') && isdigit(arg[1])) { + max_count = atoi(arg + 1); + continue; + } if (!strcmp(arg, "-n")) { if (++i >= argc) die("-n requires an argument");