Skip to content

Commit a651946

Browse files
matheustavaresgitster
authored andcommitted
cache-tree: use given repo's hash_algo at verify_one()
verify_one() takes a struct repository argument but uses the_hash_algo internally. Replace it with the provided repo's git_hash_algo, for consistency. For now, this is mainly a cosmetic change, as all callers of this function currently only pass the_repository to it. Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent eb999b3 commit a651946

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cache-tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ static void verify_one(struct repository *r,
826826
i++;
827827
}
828828
strbuf_addf(&tree_buf, "%o %.*s%c", mode, entlen, name, '\0');
829-
strbuf_add(&tree_buf, oid->hash, the_hash_algo->rawsz);
829+
strbuf_add(&tree_buf, oid->hash, r->hash_algo->rawsz);
830830
}
831831
hash_object_file(tree_buf.buf, tree_buf.len, tree_type, &new_oid);
832832
if (!oideq(&new_oid, &it->oid))

0 commit comments

Comments
 (0)