sha1_file.c: introduce a null_oid constant
authorbrian m. carlson <sandals@crustytoothpaste.net>
Sun, 6 Dec 2015 22:16:35 +0000 (22:16 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 14 Dec 2015 21:35:54 +0000 (13:35 -0800)
null_oid is the struct object_id equivalent to null_sha1.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
sha1_file.c
diff --git a/cache.h b/cache.h
index 614040e70060b8fe57aa37de4eadf5b0e7ab4920..071eecee7ab01731ea7d33c1a59d8aa41c6e6489 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -813,6 +813,7 @@ extern const char *find_unique_abbrev(const unsigned char *sha1, int len);
 extern int find_unique_abbrev_r(char *hex, const unsigned char *sha1, int len);
 
 extern const unsigned char null_sha1[GIT_SHA1_RAWSZ];
+extern const struct object_id null_oid;
 
 static inline int hashcmp(const unsigned char *sha1, const unsigned char *sha2)
 {
index 27ce7b705e12ca0343a4a232788494e5dee518d5..a54deb0558f0809e0ee98d96c9b4e1797b698fd0 100644 (file)
@@ -36,6 +36,7 @@
 static inline uintmax_t sz_fmt(size_t s) { return s; }
 
 const unsigned char null_sha1[20];
+const struct object_id null_oid;
 
 /*
  * This is meant to hold a *small* number of objects that you would