From dade09c2269ec2117df085e8a99efcabccf08c53 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sun, 3 Jul 2005 13:06:36 -0700 Subject: Add "has_sha1_pack()" function to query whether the object is available in a pack We'll want this for incremental packing. --- sha1_file.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sha1_file.c') diff --git a/sha1_file.c b/sha1_file.c index b18e467d8c..8f20e2f821 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -1267,6 +1267,12 @@ int write_sha1_from_fd(const unsigned char *sha1, int fd) return 0; } +int has_sha1_pack(const unsigned char *sha1) +{ + struct pack_entry e; + return find_pack_entry(sha1, &e); +} + int has_sha1_file(const unsigned char *sha1) { struct stat st; -- cgit v1.2.1