From 5c377d3d593d324346bbaa965cbff8870795b420 Mon Sep 17 00:00:00 2001 From: René Scharfe Date: Sat, 12 Aug 2017 10:32:59 +0200 Subject: tree-walk: convert fill_tree_descriptor() to object_id All callers of fill_tree_descriptor() have been converted to object_id already, so convert that function as well. As a nice side-effect we get rid of NULL checks in tree-diff.c, as fill_tree_descriptor() already does them for us. Helped-by: Johannes Sixt Signed-off-by: Rene Scharfe Reviewed-by: brian m. carlson Signed-off-by: Junio C Hamano --- tree-diff.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tree-diff.c') diff --git a/tree-diff.c b/tree-diff.c index 2357f72899..4bb93155bc 100644 --- a/tree-diff.c +++ b/tree-diff.c @@ -421,9 +421,8 @@ static struct combine_diff_path *ll_diff_tree_paths( * diff_tree_oid(parent, commit) ) */ for (i = 0; i < nparent; ++i) - tptree[i] = fill_tree_descriptor(&tp[i], - parents_oid[i] ? parents_oid[i]->hash : NULL); - ttree = fill_tree_descriptor(&t, oid ? oid->hash : NULL); + tptree[i] = fill_tree_descriptor(&tp[i], parents_oid[i]); + ttree = fill_tree_descriptor(&t, oid); /* Enable recursion indefinitely */ opt->pathspec.recursive = DIFF_OPT_TST(opt, RECURSIVE); -- cgit v1.2.3