summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-05-20 08:54:59 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-05-20 08:54:59 +0900
commitbdff0419da0e81a6fb957d38fd6cff06e3ffb4e3 (patch)
treef48c24e26a24f32897d06db04d57e94c41fd5ada
parentMerge branch 'en/dir-traversal' (diff)
parentremote-curl: fix clone on sha256 repos (diff)
downloadtgif-bdff0419da0e81a6fb957d38fd6cff06e3ffb4e3.tar.xz
Merge branch 'ew/sha256-clone-remote-curl-fix'
"git clone" from SHA256 repository by Git built with SHA-1 as the default hash algorithm over the dumb HTTP protocol did not correctly set up the resulting repository, which has been corrected. * ew/sha256-clone-remote-curl-fix: remote-curl: fix clone on sha256 repos
-rw-r--r--remote-curl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/remote-curl.c b/remote-curl.c
index 0290b04891..9d432c299a 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -555,6 +555,8 @@ static void output_refs(struct ref *refs)
struct ref *posn;
if (options.object_format && options.hash_algo) {
printf(":object-format %s\n", options.hash_algo->name);
+ repo_set_hash_algo(the_repository,
+ hash_algo_by_ptr(options.hash_algo));
}
for (posn = refs; posn; posn = posn->next) {
if (posn->symref)