diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2023-10-01 21:40:27 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-10-02 14:57:40 -0700 |
commit | d6222a2d05c93b22d5ef19b7361f7b1ef2964eb4 (patch) | |
tree | 3ea25fc1bc7bdb7191b92cf17540651d663da9e4 /cache-tree.c | |
parent | d7446c89b8ed57f1fa0a5b2ea5e4b7e5fcb7d9cd (diff) |
builtin/cat-file: let the oid determine the output algorithm
Use GET_OID_HASH_ANY when calling get_oid_with_context. This
implements the semi-obvious behaviour that specifying a sha1 oid shows
the output for a sha1 encoded object, and specifying a sha256 oid
shows the output for a sha256 encoded object.
This is useful for testing the the conversion of an object to an
equivalent object encoded with a different hash function.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache-tree.c')
0 files changed, 0 insertions, 0 deletions