X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fgit.git;a=blobdiff_plain;f=builtin%2Frev-parse.c;h=6c5d5d6a70f9c8834801dd309e111d72df2a3e31;hp=f8bbe6d47ec397f55bec62d6a71bc6db8f08b54b;hb=2eabd383134b7dedbda0e8367ef3df63c67a0445;hpb=1bcef512040979964816937162bfc9968d414a4d diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c index f8bbe6d47e..6c5d5d6a70 100644 --- a/builtin/rev-parse.c +++ b/builtin/rev-parse.c @@ -918,6 +918,17 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix) show_datestring("--min-age=", arg); continue; } + if (opt_with_value(arg, "--show-object-format", &arg)) { + const char *val = arg ? arg : "storage"; + + if (strcmp(val, "storage") && + strcmp(val, "input") && + strcmp(val, "output")) + die("unknown mode for --show-object-format: %s", + arg); + puts(the_hash_algo->name); + continue; + } if (show_flag(arg) && verify) die_no_single_rev(quiet); continue;