summaryrefslogtreecommitdiffstats
path: root/packfile.c
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-03-23 18:45:25 +0100
committerJunio C Hamano <gitster@pobox.com>2018-03-26 19:07:43 +0200
commit613b42f283140308435939377994c4d57d0dda23 (patch)
treef0088bd534cbd2fdef645ddb046814ff9aae5c7d /packfile.c
parentpackfile: allow reprepare_packed_git to handle arbitrary repositories (diff)
downloadgit-613b42f283140308435939377994c4d57d0dda23.tar.xz
git-613b42f283140308435939377994c4d57d0dda23.zip
packfile: add repository argument to find_pack_entry
While at it move the documentation to the header and mention which pack files are searched. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'packfile.c')
-rw-r--r--packfile.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/packfile.c b/packfile.c
index 21d256f85a..9df123f0f1 100644
--- a/packfile.c
+++ b/packfile.c
@@ -1845,11 +1845,7 @@ static int fill_pack_entry(const unsigned char *sha1,
return 1;
}
-/*
- * Iff a pack file contains the object named by sha1, return true and
- * store its location to e.
- */
-int find_pack_entry(const unsigned char *sha1, struct pack_entry *e)
+int find_pack_entry_the_repository(const unsigned char *sha1, struct pack_entry *e)
{
struct list_head *pos;
@@ -1871,7 +1867,7 @@ int find_pack_entry(const unsigned char *sha1, struct pack_entry *e)
int has_sha1_pack(const unsigned char *sha1)
{
struct pack_entry e;
- return find_pack_entry(sha1, &e);
+ return find_pack_entry(the_repository, sha1, &e);
}
int has_pack_index(const unsigned char *sha1)