summaryrefslogtreecommitdiff
path: root/tree-diff.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2017-08-12 08:32:59 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-08-14 19:38:54 (GMT)
commit5c377d3d593d324346bbaa965cbff8870795b420 (patch)
treeb2a517d5ec88c9b5c2618b80b0f45a74fdaf2638 /tree-diff.c
parentb3622a4ee94e4916cd05e6d96e41eeb36b941182 (diff)
downloadgit-5c377d3d593d324346bbaa965cbff8870795b420.zip
git-5c377d3d593d324346bbaa965cbff8870795b420.tar.gz
git-5c377d3d593d324346bbaa965cbff8870795b420.tar.bz2
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>
Diffstat (limited to 'tree-diff.c')
-rw-r--r--tree-diff.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tree-diff.c b/tree-diff.c
index 2357f72..4bb9315 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);