sha1_file.c: introduce a null_oid constant

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>

brian m. carlson committed Dec 6, 2015 at 22:16 UTC 3e56e7245c37ce57dde72ec74ee2df41ce603dda
2 files changed +2
cache.h
+1
@@ -813,6 +813,7 @@ extern const char *find_unique_abbrev(const unsigned char *sha1, int len);
813 extern int find_unique_abbrev_r(char *hex, const unsigned char *sha1, int len);
814
815 extern const unsigned char null_sha1[GIT_SHA1_RAWSZ];
816 +extern const struct object_id null_oid;
817
818 static inline int hashcmp(const unsigned char *sha1, const unsigned char *sha2)
819 {
sha1_file.c
+1
@@ -36,6 +36,7 @@
36 static inline uintmax_t sz_fmt(size_t s) { return s; }
37
38 const unsigned char null_sha1[20];
39 +const struct object_id null_oid;
40
41 /*
42 * This is meant to hold a *small* number of objects that you would