rebase: warn about the correct tree's OID
This was a simple copy/paste error, and an obvious one at that: if we cannot fill the tree descriptor, we should show an error message about *that* tree, not another one. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
Nov 20, 2018 at 01:44 UTC
4d86503eed995fe27bfa284b55fc63328534d11b
1 file changed
+2
-1
builtin/rebase.c
+2
-1
@@ -576,7 +576,8 @@ static int reset_head(struct object_id *oid, const char *action,
576
}
577
578
if (!reset_hard && !fill_tree_descriptor(&desc[nr++], &head_oid)) {
579
- ret = error(_("failed to find tree of %s"), oid_to_hex(oid));
579
+ ret = error(_("failed to find tree of %s"),
580
+ oid_to_hex(&head_oid));
581
goto leave_reset_head;
582
}
583