Thread (45 messages) 45 messages, 2 authors, 2018-05-02

[PATCH v2 36/42] cache-tree: use is_empty_tree_oid

flat view
STALE3085d

From: brian m. carlson <hidden>
Date: 2018-05-02 00:27:20
Subsystem: the rest · Maintainer: Linus Torvalds

Revision v2 of 2 in this series.

Revisions (2)
  1. v1 [diff vs current]
  2. v2 current
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 <redacted>
---
 cache-tree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cache-tree.c b/cache-tree.c
index 8c7e1258a4..25663825b5 100644
--- a/cache-tree.c
+++ b/cache-tree.c
@@ -385,7 +385,7 @@ static int update_one(struct cache_tree *it,
 		/*
 		 * "sub" can be an empty tree if all subentries are i-t-a.
 		 */
-		if (contains_ita && !oidcmp(oid, &empty_tree_oid))
+		if (contains_ita && is_empty_tree_oid(oid))
 			continue;
 
 		strbuf_grow(&buffer, entlen + 100);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help