summaryrefslogtreecommitdiff
path: root/builtin/name-rev.c
diff options
context:
space:
mode:
authorLibravatar Martin Ågren <martin.agren@gmail.com>2020-12-31 12:56:22 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-01-04 13:01:55 -0800
commit7a7d992d0dbd78cf1fc477cf1e1caf61833b3e41 (patch)
tree06e405ba8f107416381f7c9cb8b2f24b38689f62 /builtin/name-rev.c
parentobject-file.c: rename from sha1-file.c (diff)
downloadtgif-7a7d992d0dbd78cf1fc477cf1e1caf61833b3e41.tar.xz
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>
Diffstat (limited to 'builtin/name-rev.c')
-rw-r--r--builtin/name-rev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/name-rev.c b/builtin/name-rev.c
index 725dd04519..4939ceb2e5 100644
--- a/builtin/name-rev.c
+++ b/builtin/name-rev.c
@@ -408,7 +408,7 @@ static const char *get_exact_ref_match(const struct object *o)
tip_table.sorted = 1;
}
- found = sha1_pos(o->oid.hash, tip_table.table, tip_table.nr,
+ found = hash_pos(o->oid.hash, tip_table.table, tip_table.nr,
nth_tip_table_ent);
if (0 <= found)
return tip_table.table[found].refname;