pack: move has_pack_index()
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
150e3001d0
commit
f9a8672a81
@ -1846,3 +1846,11 @@ int has_sha1_pack(const unsigned char *sha1)
|
||||
struct pack_entry e;
|
||||
return find_pack_entry(sha1, &e);
|
||||
}
|
||||
|
||||
int has_pack_index(const unsigned char *sha1)
|
||||
{
|
||||
struct stat st;
|
||||
if (stat(sha1_pack_index_name(sha1), &st))
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user