]> git.ipfire.org Git - thirdparty/git.git/commitdiff
archive: fix misleading error message
authorRené Scharfe <l.s.r@web.de>
Thu, 3 Oct 2024 15:51:01 +0000 (17:51 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 3 Oct 2024 16:53:04 +0000 (09:53 -0700)
The error message added by 296743a7ca (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 <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
archive.c

index a0adb011362a4a5ef9748731ba328002de54fbba..3a32ee48d7c71ffcd26963a791ef60ea1140de51 100644 (file)
--- a/archive.c
+++ b/archive.c
@@ -536,7 +536,8 @@ static void parse_treeish_arg(const char **argv,
                opts.fn = oneway_merge;
                init_tree_desc(&t, &tree->object.oid, tree->buffer, tree->size);
                if (unpack_trees(1, &t, &opts))
-                       die(_("unable to checkout working tree"));
+                       die(_("failed to unpack tree object %s"),
+                           oid_to_hex(&tree->object.oid));
 
                git_attr_set_direction(GIT_ATTR_INDEX);
        }