]> git.ipfire.org Git - thirdparty/git.git/commitdiff
pack-revindex: remove unused 'find_pack_revindex()'
authorTaylor Blau <me@ttaylorr.com>
Wed, 13 Jan 2021 22:24:58 +0000 (17:24 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Jan 2021 05:53:47 +0000 (21:53 -0800)
Now that no callers of 'find_pack_revindex()' remain, remove the
function's declaration and implementation entirely.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pack-revindex.c
pack-revindex.h

index 0ca3b54b45d47a8c8db703a1730791b978d6cc5c..16baafb2811e0a6b9a973ca83576825aea75c3c4 100644 (file)
@@ -189,21 +189,6 @@ int find_revindex_position(struct packed_git *p, off_t ofs)
        return -1;
 }
 
-struct revindex_entry *find_pack_revindex(struct packed_git *p, off_t ofs)
-{
-       int pos;
-
-       if (load_pack_revindex(p))
-               return NULL;
-
-       pos = find_revindex_position(p, ofs);
-
-       if (pos < 0)
-               return NULL;
-
-       return p->revindex + pos;
-}
-
 int offset_to_pack_pos(struct packed_git *p, off_t ofs, uint32_t *pos)
 {
        int ret;
index 5a218aaa667903e2ad115ef93010c0b7ba520c20..f7094ba9a5d5b8de792d41bcc7a66211d17794aa 100644 (file)
@@ -30,8 +30,6 @@ struct revindex_entry {
 int load_pack_revindex(struct packed_git *p);
 int find_revindex_position(struct packed_git *p, off_t ofs);
 
-struct revindex_entry *find_pack_revindex(struct packed_git *p, off_t ofs);
-
 /*
  * offset_to_pack_pos converts an object offset to a pack position. This
  * function returns zero on success, and a negative number otherwise. The