git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2] advice: refactor "action is not possible because you have unmerged files"

From
Bagas Sanjaya <bagasdotme@gmail.com>
Date
Jan 19, 2022, 09:44 UTC
Message-ID
<20220119094445.15542-3-bagasdotme@gmail.com>
In-Reply-To
<20220119094445.15542-1-bagasdotme@gmail.com>

Factor action names (cherry-picking, committing, merging, pulling, and reverting) out of the message string.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
 advice.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/advice.c b/advice.c
index 1dfc91d176..4c72856478 100644
--- a/advice.c
+++ b/advice.c
@@ -175,15 +175,15 @@ void list_config_advices(struct string_list *list, const char *prefix)
 int error_resolve_conflict(const char *me)
 {
 	if (!strcmp(me, "cherry-pick"))
-		error(_("Cherry-picking is not possible because you have unmerged files."));
+		error(_("%s is not possible because you have unmerged files."), "Cherry-picking");
 	else if (!strcmp(me, "commit"))
-		error(_("Committing is not possible because you have unmerged files."));
+		error(_("%s is not possible because you have unmerged files."), "Commiting");
 	else if (!strcmp(me, "merge"))
-		error(_("Merging is not possible because you have unmerged files."));
+		error(_("%s is not possible because you have unmerged files."), "Merging");
 	else if (!strcmp(me, "pull"))
-		error(_("Pulling is not possible because you have unmerged files."));
+		error(_("%s is not possible because you have unmerged files."), "Pulling");
 	else if (!strcmp(me, "revert"))
-		error(_("Reverting is not possible because you have unmerged files."));
+		error(_("%s is not possible because you have unmerged files."), "Reverting");
 	else
 		error(_("It is not possible to %s because you have unmerged files."),
 			me);
-- 
An old man doll... just what I always wanted! - Clara
Previous: Jean-Noël AVILANext: René Scharfe
Message 4 of 8 in “More similar messages refactoring”
  1. 0/2 More similar messages refactoringBagas Sanjaya, Jan 19, 2022
  2. 1/2 sequencer: factor GIT_AUTHOR_* from message stringsBagas Sanjaya, Jan 19, 2022
  3. Jean-Noël AVILAFeb 11, 2022
  4. 2/2 advice: refactor "action is not possible because you have unmerged files"Bagas Sanjaya, Jan 19, 2022
  5. René ScharfeJan 19, 2022
  6. Ævar Arnfjörð BjarmasonJan 19, 2022
  7. Jean-Noël AVILAJan 19, 2022
  8. Junio C HamanoJan 19, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.