From 8ba221e2453658f8843176cc00fc5cfe36e07b41 Mon Sep 17 00:00:00 2001 From: Derrick Stolee Date: Tue, 22 Mar 2022 17:28:39 +0000 Subject: bundle: output hash information in 'verify' The previous change moved the 'filter' capability to the end of the 'git bundle verify' output. Now, add the 'object-format' capability to the output, when it exists. This change makes 'git bundle verify' output the hash used in all cases, even if the capability is not in the bundle. This means that v2 bundles will always output that they use "sha1". This might look noisy to some users, but it does simplify the implementation and the test strategy for this feature. Since 'verify' ends early when a prerequisite commit is missing, we need to insert this hash message carefully into our expected test output throughout t6020. Signed-off-by: Derrick Stolee Signed-off-by: Junio C Hamano --- bundle.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bundle.c') diff --git a/bundle.c b/bundle.c index 276b55f8ce..d50cfb5aa7 100644 --- a/bundle.c +++ b/bundle.c @@ -278,6 +278,8 @@ int verify_bundle(struct repository *r, list_refs(r, 0, NULL); } + printf_ln("The bundle uses this hash algorithm: %s", + header->hash_algo->name); if (header->filter.choice) printf_ln("The bundle uses this filter: %s", list_objects_filter_spec(&header->filter)); -- cgit v1.2.1