diff options
author | René Scharfe <l.s.r@web.de> | 2017-08-12 10:32:59 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-14 12:38:54 -0700 |
commit | 5c377d3d593d324346bbaa965cbff8870795b420 (patch) | |
tree | b2a517d5ec88c9b5c2618b80b0f45a74fdaf2638 /tree-diff.c | |
parent | b3622a4ee94e4916cd05e6d96e41eeb36b941182 (diff) | |
download | git-5c377d3d593d324346bbaa965cbff8870795b420.tar.gz |
tree-walk: convert fill_tree_descriptor() to object_idrs/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>
Diffstat (limited to 'tree-diff.c')
-rw-r--r-- | tree-diff.c | 5 |
1 files changed, 2 insertions, 3 deletions
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); |