From 7a7d992d0dbd78cf1fc477cf1e1caf61833b3e41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20=C3=85gren?= Date: Thu, 31 Dec 2020 12:56:22 +0100 Subject: sha1-lookup: rename `sha1_pos()` as `hash_pos()` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename this function to reflect that we're not just able to handle SHA-1 these days. There are a few instances of "sha1" left in sha1-lookup.[ch] after this, but those will be addressed in the next commit. Signed-off-by: Martin Ă…gren Reviewed-by: Derrick Stolee Signed-off-by: Junio C Hamano --- commit-graph.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'commit-graph.c') diff --git a/commit-graph.c b/commit-graph.c index 06f8dc1d89..c672feee91 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -1043,7 +1043,7 @@ static int write_graph_chunk_data(struct hashfile *f, if (!parent) edge_value = GRAPH_PARENT_NONE; else { - edge_value = sha1_pos(parent->item->object.oid.hash, + edge_value = hash_pos(parent->item->object.oid.hash, ctx->commits.list, ctx->commits.nr, commit_to_sha1); @@ -1074,7 +1074,7 @@ static int write_graph_chunk_data(struct hashfile *f, else if (parent->next) edge_value = GRAPH_EXTRA_EDGES_NEEDED | num_extra_edges; else { - edge_value = sha1_pos(parent->item->object.oid.hash, + edge_value = hash_pos(parent->item->object.oid.hash, ctx->commits.list, ctx->commits.nr, commit_to_sha1); @@ -1143,7 +1143,7 @@ static int write_graph_chunk_extra_edges(struct hashfile *f, /* Since num_parents > 2, this initializer is safe. */ for (parent = (*list)->parents->next; parent; parent = parent->next) { - int edge_value = sha1_pos(parent->item->object.oid.hash, + int edge_value = hash_pos(parent->item->object.oid.hash, ctx->commits.list, ctx->commits.nr, commit_to_sha1); -- cgit v1.2.3