Skip to content

Commit a060705

Browse files
committed
commit: do not use cryptic "new_index" in end-user facing messages
These error messages say "new_index" as if that spelling has some significance to the end users (e.g. the file "$GIT_DIR/new_index" has some issues), but that is not the case at all. The i18n folks were made to include the word literally in the translated messages, which was not a good idea at all. Spell it "new index", as we are just telling the users that we failed to create a new index file. The term is expected to be translated to the end-users' languages, not left as if it were a literal file name. This dates all the way back to the first re-implemenation of "git commit" command in C (the scripted version did not have such wording in its error messages), in f5bbc32 (Port git commit to C., 2007-11-08). Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0d1bd1d commit a060705

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

builtin/commit.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ static const char *prepare_index(const char **argv, const char *prefix,
446446
refresh_cache_or_die(refresh_flags);
447447
cache_tree_update(&the_index, WRITE_TREE_SILENT);
448448
if (write_locked_index(&the_index, &index_lock, 0))
449-
die(_("unable to write new_index file"));
449+
die(_("unable to write new index file"));
450450
commit_style = COMMIT_NORMAL;
451451
ret = get_lock_file_path(&index_lock);
452452
goto out;
@@ -470,7 +470,7 @@ static const char *prepare_index(const char **argv, const char *prefix,
470470
cache_tree_update(&the_index, WRITE_TREE_SILENT);
471471
if (write_locked_index(&the_index, &index_lock,
472472
COMMIT_LOCK | SKIP_IF_UNCHANGED))
473-
die(_("unable to write new_index file"));
473+
die(_("unable to write new index file"));
474474
commit_style = COMMIT_AS_IS;
475475
ret = get_index_file();
476476
goto out;
@@ -518,7 +518,7 @@ static const char *prepare_index(const char **argv, const char *prefix,
518518
refresh_index(&the_index, REFRESH_QUIET, NULL, NULL, NULL);
519519
cache_tree_update(&the_index, WRITE_TREE_SILENT);
520520
if (write_locked_index(&the_index, &index_lock, 0))
521-
die(_("unable to write new_index file"));
521+
die(_("unable to write new index file"));
522522

523523
hold_lock_file_for_update(&false_lock,
524524
git_path("next-index-%"PRIuMAX,
@@ -1852,7 +1852,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
18521852

18531853
if (commit_index_files())
18541854
die(_("repository has been updated, but unable to write\n"
1855-
"new_index file. Check that disk is not full and quota is\n"
1855+
"new index file. Check that disk is not full and quota is\n"
18561856
"not exceeded, and then \"git restore --staged :/\" to recover."));
18571857

18581858
git_test_write_commit_graph_or_die();

0 commit comments

Comments
 (0)