path: root/builtin/reset.c
diff options
authorRené Scharfe <>2017-08-12 08:32:59 (GMT)
committerJunio C Hamano <>2017-08-14 19:38:54 (GMT)
commit5c377d3d593d324346bbaa965cbff8870795b420 (patch)
treeb2a517d5ec88c9b5c2618b80b0f45a74fdaf2638 /builtin/reset.c
parentb3622a4ee94e4916cd05e6d96e41eeb36b941182 (diff)
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 <>
Diffstat (limited to 'builtin/reset.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/reset.c b/builtin/reset.c
index 046403e..4a02d74 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -75,13 +75,13 @@ static int reset_index(const struct object_id *oid, int reset_type, int quiet)
struct object_id head_oid;
if (get_oid("HEAD", &head_oid))
return error(_("You do not have a valid HEAD."));
- if (!fill_tree_descriptor(desc, head_oid.hash))
+ if (!fill_tree_descriptor(desc, &head_oid))
return error(_("Failed to find tree of HEAD."));
opts.fn = twoway_merge;
- if (!fill_tree_descriptor(desc + nr - 1, oid->hash))
+ if (!fill_tree_descriptor(desc + nr - 1, oid))
return error(_("Failed to find tree of %s."), oid_to_hex(oid));
if (unpack_trees(nr, desc, &opts))
return -1;