]> git.ipfire.org Git - thirdparty/git.git/commit - apply.c
sha1-file: pass git_hash_algo to hash_object_file()
authorMatheus Tavares <matheus.bernardino@usp.br>
Thu, 30 Jan 2020 20:32:22 +0000 (17:32 -0300)
committerJunio C Hamano <gitster@pobox.com>
Fri, 31 Jan 2020 18:45:39 +0000 (10:45 -0800)
commit2dcde20e1c55fc2e3f9e9e6d48e93c39ec5661d2
tree9039d3dd520e915bf531c8f2f32190a4a87d9ccd
parent7ad5c44d9ce559703245d389aa71c4445dc9359c
sha1-file: pass git_hash_algo to hash_object_file()

Allow hash_object_file() to work on arbitrary repos by introducing a
git_hash_algo parameter. Change callers which have a struct repository
pointer in their scope to pass on the git_hash_algo from the said repo.
For all other callers, pass on the_hash_algo, which was already being
used internally at hash_object_file(). This functionality will be used
in the following patch to make check_object_signature() be able to work
on arbitrary repos (which, in turn, will be used to fix an
inconsistency at object.c:parse_object()).

Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
apply.c
builtin/index-pack.c
builtin/replace.c
builtin/unpack-objects.c
cache-tree.c
convert.c
diffcore-rename.c
dir.c
log-tree.c
object-store.h
sha1-file.c