From 7d924c9139e33e7599d7aed0446e634c427a5f15 Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Sun, 17 Apr 2016 23:10:39 +0000 Subject: struct name_entry: use struct object_id instead of unsigned char sha1[20] Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- tree.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tree.c') diff --git a/tree.c b/tree.c index f79ff9813e..0089e52d9d 100644 --- a/tree.c +++ b/tree.c @@ -76,7 +76,7 @@ static int read_tree_1(struct tree *tree, struct strbuf *base, continue; } - switch (fn(entry.sha1, base, + switch (fn(entry.oid->hash, base, entry.path, entry.mode, stage, context)) { case 0: continue; @@ -87,19 +87,19 @@ static int read_tree_1(struct tree *tree, struct strbuf *base, } if (S_ISDIR(entry.mode)) - hashcpy(sha1, entry.sha1); + hashcpy(sha1, entry.oid->hash); else if (S_ISGITLINK(entry.mode)) { struct commit *commit; - commit = lookup_commit(entry.sha1); + commit = lookup_commit(entry.oid->hash); if (!commit) die("Commit %s in submodule path %s%s not found", - sha1_to_hex(entry.sha1), + oid_to_hex(entry.oid), base->buf, entry.path); if (parse_commit(commit)) die("Invalid commit %s in submodule path %s%s", - sha1_to_hex(entry.sha1), + oid_to_hex(entry.oid), base->buf, entry.path); hashcpy(sha1, commit->tree->object.oid.hash); -- cgit v1.2.3