From e0a92804044a4025fc8abbfa1d92fd16f6f2e1f4 Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Mon, 1 May 2017 02:28:56 +0000 Subject: Convert struct cache_tree to use struct object_id Convert the sha1 member of struct cache_tree to struct object_id by changing the definition and applying the following semantic patch, plus the standard object_id transforms: @@ struct cache_tree E1; @@ - E1.sha1 + E1.oid.hash @@ struct cache_tree *E1; @@ - E1->sha1 + E1->oid.hash Fix up one reference to active_cache_tree which was not automatically caught by Coccinelle. These changes are prerequisites for converting parse_object. Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- cache-tree.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cache-tree.h') diff --git a/cache-tree.h b/cache-tree.h index 41c574663..f7b9cab7e 100644 --- a/cache-tree.h +++ b/cache-tree.h @@ -1,6 +1,7 @@ #ifndef CACHE_TREE_H #define CACHE_TREE_H +#include "cache.h" #include "tree.h" #include "tree-walk.h" @@ -15,7 +16,7 @@ struct cache_tree_sub { struct cache_tree { int entry_count; /* negative means "invalid" */ - unsigned char sha1[20]; + struct object_id oid; int subtree_nr; int subtree_alloc; struct cache_tree_sub **down; -- cgit v1.2.1