Skip to content

Commit bebf0e2

Browse files
rscharfegitster
authored andcommitted
archive: fix misleading error message
The error message added by 296743a (archive: load index before pathspec checks, 2024-09-21) is misleading: unpack_trees() is not touching the working tree at all here, but just loading a tree into the index. Correct it. Signed-off-by: René Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 296743a commit bebf0e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

archive.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,8 @@ static void parse_treeish_arg(const char **argv,
536536
opts.fn = oneway_merge;
537537
init_tree_desc(&t, &tree->object.oid, tree->buffer, tree->size);
538538
if (unpack_trees(1, &t, &opts))
539-
die(_("unable to checkout working tree"));
539+
die(_("failed to unpack tree object %s"),
540+
oid_to_hex(&tree->object.oid));
540541

541542
git_attr_set_direction(GIT_ATTR_INDEX);
542543
}

0 commit comments

Comments
 (0)