Browse Source

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
maint
Junio C Hamano 4 years ago
parent
commit
bdff0419da
  1. 2
      remote-curl.c

2
remote-curl.c

@ -555,6 +555,8 @@ static void output_refs(struct ref *refs)
struct ref *posn; struct ref *posn;
if (options.object_format && options.hash_algo) { if (options.object_format && options.hash_algo) {
printf(":object-format %s\n", options.hash_algo->name); 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) { for (posn = refs; posn; posn = posn->next) {
if (posn->symref) if (posn->symref)

Loading…
Cancel
Save