[PATCH 2/2] read-cache: unify write index error message

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

 



Currently, there are ten uses of "could not write index", two uses of
"unable to write index file" and two uses of "Unable to write index.".
Change them to the most Change them to the most common phrase.

Signed-off-by: Han Young <hanyang.tony@xxxxxxxxxxxxx>
---
 builtin/am.c         | 2 +-
 builtin/commit.c     | 2 +-
 builtin/merge.c      | 2 +-
 merge-ort-wrappers.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/builtin/am.c b/builtin/am.c
index e32a3b4c97..69f24df5c0 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -1816,7 +1816,7 @@ static void am_run(struct am_state *state, int resume)
 
 	if (repo_refresh_and_write_index(the_repository, REFRESH_QUIET, 0, 0,
 					 NULL, NULL, NULL) < 0)
-		die(_("unable to write index file"));
+		die(_("could not write index"));
 
 	if (repo_index_has_changes(the_repository, NULL, &sb)) {
 		write_state_bool(state, "dirtyindex", 1);
diff --git a/builtin/commit.c b/builtin/commit.c
index 66bd91fd52..f60f85ea36 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -415,7 +415,7 @@ static const char *prepare_index(const char **argv, const char *prefix,
 				repo_get_git_dir(the_repository));
 		if (cache_tree_update(the_repository->index, WRITE_TREE_SILENT) == 0) {
 			if (reopen_lock_file(&index_lock) < 0)
-				die(_("unable to write index file"));
+				die(_("could not write index"));
 			if (write_locked_index(the_repository->index, &index_lock, 0))
 				die(_("unable to update temporary index"));
 		} else
diff --git a/builtin/merge.c b/builtin/merge.c
index ce90e52fe4..876a2e04f3 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -736,7 +736,7 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,
 	if (repo_refresh_and_write_index(the_repository, REFRESH_QUIET,
 					 SKIP_IF_UNCHANGED, 0, NULL, NULL,
 					 NULL) < 0)
-		die(_("Unable to write index."));
+		die(_("could not write index"));
 
 	if (!strcmp(strategy, "recursive") || !strcmp(strategy, "subtree") ||
 	    !strcmp(strategy, "ort")) {
diff --git a/merge-ort-wrappers.c b/merge-ort-wrappers.c
index c54d56b344..666ed27437 100644
--- a/merge-ort-wrappers.c
+++ b/merge-ort-wrappers.c
@@ -128,7 +128,7 @@ int merge_ort_generic(struct merge_options *opt,
 
 	if (write_locked_index(opt->repo->index, &lock,
 			       COMMIT_LOCK | SKIP_IF_UNCHANGED))
-		return error(_("Unable to write index."));
+		return error(_("could not write index"));
 
 	return clean ? 0 : 1;
 }
-- 
2.48.1





[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