Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerrick Stolee <derrickstolee@github.com>2022-03-22 20:28:39 +0300
committerJunio C Hamano <gitster@pobox.com>2022-03-23 23:14:09 +0300
commit8ba221e2453658f8843176cc00fc5cfe36e07b41 (patch)
treefb0b617fe1730daa3b6ebe2b593e414a5480976f /bundle.c
parent017303eb483c48515095abcabf024101951f82ae (diff)
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 <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'bundle.c')
-rw-r--r--bundle.c2
1 files changed, 2 insertions, 0 deletions
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));