diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-10-22 11:38:58 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-10-22 11:38:58 -0700 |
| commit | 98401c10fc9e991b36c4ccf5a270746f123feeb6 (patch) | |
| tree | 83d4cb6fc595ed0db95d680c28178f8679e8af46 /builtin | |
| parent | Merge branch 'js/ci-github-actions-update' (diff) | |
| parent | t1010: use BROKEN_OBJECTS prerequisite (diff) | |
| download | git-98401c10fc9e991b36c4ccf5a270746f123feeb6.tar.gz git-98401c10fc9e991b36c4ccf5a270746f123feeb6.zip | |
Merge branch 'bc/sha1-256-interop-01'
The beginning of SHA1-SHA256 interoperability work.
* bc/sha1-256-interop-01:
t1010: use BROKEN_OBJECTS prerequisite
t: allow specifying compatibility hash
fsck: consider gpgsig headers expected in tags
rev-parse: allow printing compatibility hash
docs: add documentation for loose objects
docs: improve ambiguous areas of pack format documentation
docs: reflect actual double signature for tags
docs: update offset order for pack index v3
docs: update pack index v3 format
Diffstat (limited to 'builtin')
| -rw-r--r-- | builtin/rev-parse.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c index 9da92b990d..7b3711cf34 100644 --- a/builtin/rev-parse.c +++ b/builtin/rev-parse.c @@ -1107,11 +1107,20 @@ int cmd_rev_parse(int argc, const char *val = arg ? arg : "storage"; if (strcmp(val, "storage") && + strcmp(val, "compat") && strcmp(val, "input") && strcmp(val, "output")) die(_("unknown mode for --show-object-format: %s"), arg); - puts(the_hash_algo->name); + + if (!strcmp(val, "compat")) { + if (the_repository->compat_hash_algo) + puts(the_repository->compat_hash_algo->name); + else + putchar('\n'); + } else { + puts(the_hash_algo->name); + } continue; } if (!strcmp(arg, "--show-ref-format")) { |
