pack: move find_sha1_pack()
Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
a2551953b9
commit
d6fe0036fd
13
packfile.c
13
packfile.c
@ -1774,3 +1774,16 @@ int is_pack_valid(struct packed_git *p)
|
||||
/* Force the pack to open to prove its valid. */
|
||||
return !open_packed_git(p);
|
||||
}
|
||||
|
||||
struct packed_git *find_sha1_pack(const unsigned char *sha1,
|
||||
struct packed_git *packs)
|
||||
{
|
||||
struct packed_git *p;
|
||||
|
||||
for (p = packs; p; p = p->next) {
|
||||
if (find_pack_entry_one(sha1, p))
|
||||
return p;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user