summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatheus Tavares <matheus.bernardino@usp.br>2020-01-30 20:32:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-01-31 18:45:39 (GMT)
commita6519467304dacb356da8a6c471d735ee6e846a4 (patch)
tree75ca7eaa7100ef9b68ee6ee1578bee0c647dd2a5
parenteb999b3295b22680a41c0d807a8b442407b1b19f (diff)
downloadgit-a6519467304dacb356da8a6c471d735ee6e846a4.zip
git-a6519467304dacb356da8a6c471d735ee6e846a4.tar.gz
git-a6519467304dacb356da8a6c471d735ee6e846a4.tar.bz2
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>
-rw-r--r--cache-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cache-tree.c b/cache-tree.c
index 1bd1b23..8c51a15 100644
--- a/cache-tree.c
+++ b/cache-tree.c
@@ -826,7 +826,7 @@ static void verify_one(struct repository *r,
i++;
}
strbuf_addf(&tree_buf, "%o %.*s%c", mode, entlen, name, '\0');
- strbuf_add(&tree_buf, oid->hash, the_hash_algo->rawsz);
+ strbuf_add(&tree_buf, oid->hash, r->hash_algo->rawsz);
}
hash_object_file(tree_buf.buf, tree_buf.len, tree_type, &new_oid);
if (!oideq(&new_oid, &it->oid))