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
This commit is contained in:
Junio C Hamano 2021-05-20 08:54:59 +09:00
commit bdff0419da

View file

@ -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)