]> asedeno.scripts.mit.edu Git - git.git/blobdiff - builtin-blame.c
restore legacy behavior for read_sha1_file()
[git.git] / builtin-blame.c
index 99f5140013d9c4c0502ca814371c4757751fd1ac..06c7de429799f4af5303253775f21b7f37723b94 100644 (file)
@@ -25,7 +25,7 @@ static char blame_usage[] = "git-blame [options] [rev-opts] [rev] [--] file";
 static const char *blame_opt_usage[] = {
        blame_usage,
        "",
-       "[rev-opts] are documented in git-rev-parse(1)",
+       "[rev-opts] are documented in git-rev-list(1)",
        NULL
 };
 
@@ -2305,8 +2305,6 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
        parse_options_start(&ctx, argc, argv, PARSE_OPT_KEEP_DASHDASH |
                            PARSE_OPT_KEEP_ARGV0);
        for (;;) {
-               int n;
-
                switch (parse_options_step(&ctx, options, blame_opt_usage)) {
                case PARSE_OPT_HELP:
                        exit(129);
@@ -2320,14 +2318,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
                        ctx.argv[0] = "--children";
                        reverse = 1;
                }
-               n = handle_revision_opt(&revs, ctx.argc, ctx.argv,
-                                       &ctx.cpidx, ctx.out);
-               if (n <= 0) {
-                       error("unknown option `%s'", ctx.argv[0]);
-                       usage_with_options(blame_opt_usage, options);
-               }
-               ctx.argv += n;
-               ctx.argc -= n;
+               parse_revision_opt(&revs, &ctx, options, blame_opt_usage);
        }
 parse_done:
        argc = parse_options_end(&ctx);