Skip to content

Commit 3e56e72

Browse files
bk2204gitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent fcd30b1 commit 3e56e72

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

cache.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,7 @@ extern const char *find_unique_abbrev(const unsigned char *sha1, int len);
813813
extern int find_unique_abbrev_r(char *hex, const unsigned char *sha1, int len);
814814

815815
extern const unsigned char null_sha1[GIT_SHA1_RAWSZ];
816+
extern const struct object_id null_oid;
816817

817818
static inline int hashcmp(const unsigned char *sha1, const unsigned char *sha2)
818819
{

sha1_file.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
static inline uintmax_t sz_fmt(size_t s) { return s; }
3737

3838
const unsigned char null_sha1[20];
39+
const struct object_id null_oid;
3940

4041
/*
4142
* This is meant to hold a *small* number of objects that you would

0 commit comments

Comments
 (0)