diff options
Diffstat (limited to 'packfile.c')
-rw-r--r-- | packfile.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/packfile.c b/packfile.c index 322c43d74a..84d16bf7e0 100644 --- a/packfile.c +++ b/packfile.c @@ -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; +} |