]> asedeno.scripts.mit.edu Git - git.git/blobdiff - builtin-shortlog.c
Merge branch 'js/merge-rr'
[git.git] / builtin-shortlog.c
index 9107bffb9b004407abb5174142c99ce7d1c5e864..01362022c0990cc785d7bcc77f21802c5e75b3e2 100644 (file)
@@ -255,21 +255,13 @@ int cmd_shortlog(int argc, const char **argv, const char *prefix)
                            PARSE_OPT_KEEP_ARGV0);
 
        for (;;) {
-               int n;
                switch (parse_options_step(&ctx, options, shortlog_usage)) {
                case PARSE_OPT_HELP:
                        exit(129);
                case PARSE_OPT_DONE:
                        goto parse_done;
                }
-               n = handle_revision_opt(&rev, ctx.argc, ctx.argv,
-                                       &ctx.cpidx, ctx.out);
-               if (n <= 0) {
-                       error("unknown option `%s'", ctx.argv[0]);
-                       usage_with_options(shortlog_usage, options);
-               }
-               ctx.argv += n;
-               ctx.argc -= n;
+               parse_revision_opt(&rev, &ctx, options, shortlog_usage);
        }
 parse_done:
        argc = parse_options_end(&ctx);