[PATCH] archive: fix misleading error message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
Silly me, I stole the wrong message. :-/

 archive.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/archive.c b/archive.c
index 58f86bf75c..a7a92ff839 100644
--- 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);
 	}
--
2.46.2





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux