summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c333038)
raw | patch | inline | side by side (parent: c333038)
author | Linus Torvalds <torvalds@g5.osdl.org> | |
Sun, 3 Jul 2005 20:06:36 +0000 (13:06 -0700) | ||
committer | Linus Torvalds <torvalds@g5.osdl.org> | |
Sun, 3 Jul 2005 20:06:36 +0000 (13:06 -0700) |
We'll want this for incremental packing.
cache.h | patch | blob | history | |
sha1_file.c | patch | blob | history |
index 1c0345b5d909807e0c81791283bd39a97c96aefd..bf589a804597322a884ea66a4f10b37b579ab9de 100644 (file)
--- a/cache.h
+++ b/cache.h
extern int write_sha1_from_fd(const unsigned char *sha1, int fd);
+extern int has_sha1_pack(const unsigned char *sha1);
extern int has_sha1_file(const unsigned char *sha1);
/* Convert to/from hex/sha1 representation */
diff --git a/sha1_file.c b/sha1_file.c
index b18e467d8c93843882c892f8810904a9fcd20b01..8f20e2f82182a2ab25d7f07a13ac038faececcbc 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
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;