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 <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
brian m. carlson committed
May 2, 2018 at 00:26 UTC
a0554934364f3c8921abb8f7526301e81c230dac
1 file changed
+1
-1
cache-tree.c
+1
-1
@@ -385,7 +385,7 @@ static int update_one(struct cache_tree *it,
385
/*
386
* "sub" can be an empty tree if all subentries are i-t-a.
387
*/
388
- if (contains_ita && !oidcmp(oid, &empty_tree_oid))
388
+ if (contains_ita && is_empty_tree_oid(oid))
389
continue;
390
391
strbuf_grow(&buffer, entlen + 100);