Skip to content

Commit a055493

Browse files
bk2204gitster
authored andcommitted
cache-tree: use is_empty_tree_oid
When comparing an object ID against that of the empty tree, use the is_empty_tree_oid function to ensure that we abstract over the hash algorithm properly. In addition, this is more readable than a plain oidcmp. Signed-off-by: brian m. carlson <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 62ba93e commit a055493

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cache-tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ static int update_one(struct cache_tree *it,
385385
/*
386386
* "sub" can be an empty tree if all subentries are i-t-a.
387387
*/
388-
if (contains_ita && !oidcmp(oid, &empty_tree_oid))
388+
if (contains_ita && is_empty_tree_oid(oid))
389389
continue;
390390

391391
strbuf_grow(&buffer, entlen + 100);

0 commit comments

Comments
 (0)