summaryrefslogtreecommitdiff
path: root/rev-list.c
diff options
context:
space:
mode:
Diffstat (limited to 'rev-list.c')
-rw-r--r--rev-list.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/rev-list.c b/rev-list.c
index 0b142c1a6f..4565755217 100644
--- a/rev-list.c
+++ b/rev-list.c
@@ -749,6 +749,16 @@ int main(int argc, const char **argv)
struct commit *commit;
unsigned char sha1[20];
+ if (!strcmp(arg, "-n")) {
+ if (++i >= argc)
+ die("-n requires an argument");
+ max_count = atoi(argv[i]);
+ continue;
+ }
+ if (!strncmp(arg,"-n",2)) {
+ max_count = atoi(arg + 2);
+ continue;
+ }
if (!strncmp(arg, "--max-count=", 12)) {
max_count = atoi(arg + 12);
continue;