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 <j6t@kdbg.org>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Reviewed-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
René Scharfe
2017-08-12 10:32:59 +02:00
committed by Junio C Hamano
parent b3622a4ee9
commit 5c377d3d59
8 changed files with 23 additions and 23 deletions

View File

@@ -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);