archive.c: mark more strings for translation

Two messages also print extra information to be more useful Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nguyễn Thái Ngọc Duy committed Nov 10, 2018 at 06:16 UTC c6e7965ddf950d764942ddc3c327103731354303
1 file changed +4 -4
archive.c
+4 -4
@@ -385,12 +385,12 @@ static void parse_treeish_arg(const char **argv,
385 int refnamelen = colon - name;
386
387 if (!dwim_ref(name, refnamelen, &oid, &ref))
388 - die("no such ref: %.*s", refnamelen, name);
388 + die(_("no such ref: %.*s"), refnamelen, name);
389 free(ref);
390 }
391
392 if (get_oid(name, &oid))
393 - die("Not a valid object name");
393 + die(_("not a valid object name: %s"), name);
394
395 commit = lookup_commit_reference_gently(ar_args->repo, &oid, 1);
396 if (commit) {
@@ -403,7 +403,7 @@ static void parse_treeish_arg(const char **argv,
403
404 tree = parse_tree_indirect(&oid);
405 if (tree == NULL)
406 - die("not a tree object");
406 + die(_("not a tree object: %s"), oid_to_hex(&oid));
407
408 if (prefix) {
409 struct object_id tree_oid;
@@ -413,7 +413,7 @@ static void parse_treeish_arg(const char **argv,
413 err = get_tree_entry(&tree->object.oid, prefix, &tree_oid,
414 &mode);
415 if (err || !S_ISDIR(mode))
416 - die("current working directory is untracked");
416 + die(_("current working directory is untracked"));
417
418 tree = parse_tree_indirect(&tree_oid);
419 }