sha1-lookup: rename sha1_pos() as hash_pos()

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 <martin.agren@gmail.com>
Reviewed-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Martin Ågren
2020-12-31 12:56:22 +01:00
committed by Junio C Hamano
parent e5afd4449d
commit 7a7d992d0d
8 changed files with 15 additions and 15 deletions

View File

@ -482,7 +482,7 @@ static void write_selected_commits_v1(struct hashfile *f,
struct bitmapped_commit *stored = &writer.selected[i];
int commit_pos =
sha1_pos(stored->commit->object.oid.hash, index, index_nr, sha1_access);
hash_pos(stored->commit->object.oid.hash, index, index_nr, sha1_access);
if (commit_pos < 0)
BUG("trying to write commit not in index");