Skip to content

Commit 4d86503

Browse files
dschogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent bac2a1e commit 4d86503

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

builtin/rebase.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,8 @@ static int reset_head(struct object_id *oid, const char *action,
576576
}
577577

578578
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));
580581
goto leave_reset_head;
581582
}
582583

0 commit comments

Comments
 (0)