diff options
author | Michael J Gruber <git@drmicha.warpmail.net> | 2015-06-01 15:50:05 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-06-01 16:01:21 -0700 |
commit | c1312cd3af14f6fd63d6ea152a8f2f63b7181838 (patch) | |
tree | 019d127b3568f07d4ebde3634ea54719c4306fc3 /builtin/checkout.c | |
parent | 75f39dec396031ece8f36c8984bb3f46532f3b34 (diff) | |
download | git-mg/index-read-error-messages.tar.gz |
messages: uniform error messages for index writemg/index-read-error-messages
Currently, we have different wordings for the same index write error
message, which may be confusing to users and increases the risk of
more severely different translated messages:
builtin/add.c: die(_("Unable to write new index file"));
builtin/apply.c: die(_("Unable to write new index file"));
builtin/checkout.c: die(_("unable to write new index file"));
builtin/checkout-index.c: die("Unable to write new index file");
builtin/clone.c: die(_("unable to write new index file"));
builtin/commit.c: die(_("unable to create temporary index"));
builtin/commit.c: die(_("unable to update temporary index file"));
builtin/commit.c: die(_("unable to write index file"));
builtin/commit.c: die(_("unable to write new_index file"));
builtin/commit.c: die(_("unable to write new_index file"));
builtin/commit.c: die(_("unable to write new_index file"));
builtin/commit.c: die(_("unable to write temporary index file"));
builtin/commit.c: "new_index file. Check that disk is not full and quota is\n"
builtin/merge.c: return error(_("Unable to write index."));
builtin/mv.c: die(_("Unable to write new index file"));
builtin/read-tree.c: die("unable to write new index file");
builtin/rm.c: die(_("Unable to write new index file"));
builtin/update-index.c: die("Unable to write new index file");
merge.c: die(_("unable to write new index file"));
merge-recursive.c: return error(_("Unable to write index."));
pack-write.c: die_errno("unable to create '%s'", index_name);
rerere.c: die("Unable to write new index file");
sequencer.c: die(_("%s: Unable to write new index file"), action_name(opts));
test-scrap-cache-tree.c: die("unable to write index file");
Except for "checkout", "new index" always refers to the new state of the
index file, which is extra confusing. "checkout" does not talk about
"new work tree" (but "work tree") either. Therefore, word all of these
as "unable to write index file" (by possibly omitting "new" or "new_",
adjusting capitalization and punctuation, turning "create" into
"write"), except for:
* Leave "temporary" in place and add TRANSLATORS note.
It may happen that the index file is writable but not the temporary
one.
* Leave pack-write.c alone.
It is low level without l10n.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/checkout.c')
-rw-r--r-- | builtin/checkout.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c index 3e141fc149..68b5f9c56c 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -371,7 +371,7 @@ static int checkout_paths(const struct checkout_opts *opts, } if (write_locked_index(&the_index, lock_file, COMMIT_LOCK)) - die(_("unable to write new index file")); + die(_("unable to write index file")); read_ref_full("HEAD", 0, rev, &flag); head = lookup_commit_reference_gently(rev, 1); @@ -577,7 +577,7 @@ static int merge_working_tree(const struct checkout_opts *opts, cache_tree_update(&the_index, WRITE_TREE_SILENT | WRITE_TREE_REPAIR); if (write_locked_index(&the_index, lock_file, COMMIT_LOCK)) - die(_("unable to write new index file")); + die(_("unable to write index file")); if (!opts->force && !opts->quiet) show_local_changes(&new->commit->object, &opts->diff_options); |