Merge branch 'mt/use-passed-repo-more-in-funcs'

Some codepaths were given a repository instance as a parameter to
work in the repository, but passed the_repository instance to its
callees, which has been cleaned up (somewhat).

* mt/use-passed-repo-more-in-funcs:
  sha1-file: allow check_object_signature() to handle any repo
  sha1-file: pass git_hash_algo to hash_object_file()
  sha1-file: pass git_hash_algo to write_object_file_prepare()
  streaming: allow open_istream() to handle any repo
  pack-check: use given repo's hash_algo at verify_packfile()
  cache-tree: use given repo's hash_algo at verify_one()
  diff: make diff_populate_filespec() honor its repo argument
This commit is contained in:
Junio C Hamano
2020-02-14 12:54:22 -08:00
22 changed files with 106 additions and 76 deletions

2
diff.c
View File

@ -4024,7 +4024,7 @@ int diff_populate_filespec(struct repository *r,
return 0;
}
}
s->data = read_object_file(&s->oid, &type, &s->size);
s->data = repo_read_object_file(r, &s->oid, &type, &s->size);
if (!s->data)
die("unable to read %s", oid_to_hex(&s->oid));
s->should_free = 1;