Merge branch 'bc/hash-independent-tests-part-6'

Test updates to prepare for SHA-2 transition continues.

* bc/hash-independent-tests-part-6:
  t4048: abstract away SHA-1-specific constants
  t4045: make hash-size independent
  t4044: update test to work with SHA-256
  t4039: abstract away SHA-1-specific constants
  t4038: abstract away SHA-1 specific constants
  t4034: abstract away SHA-1-specific constants
  t4027: make hash-size independent
  t4015: abstract away SHA-1-specific constants
  t4011: abstract away SHA-1-specific constants
  t4010: abstract away SHA-1-specific constants
  t3429: remove SHA1 annotation
  t1305: avoid comparing extensions
  rev-parse: add a --show-object-format option
  t/oid-info: add empty tree and empty blob values
  t/oid-info: allow looking up hash algorithm name
This commit is contained in:
Junio C Hamano
2019-11-10 18:02:17 +09:00
16 changed files with 278 additions and 156 deletions

View File

@ -919,6 +919,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;