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

[PATCH 1/2] git-sh-i18n: remove unused eval_ngettext()

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Oct 21, 2021, 18:37 UTC
Message-ID
<patch-1.2-4552f2115d1-20211021T183627Z-avarab@gmail.com>
In-Reply-To
<cover-0.2-00000000000-20211021T183627Z-avarab@gmail.com>

The "eval_ngettext()" function has been orphaned since its last user was removed in a74b35081c5 (rebase: drop support for `--preserve-merges`, 2021-09-07).

See b8fc9e43a7d (i18n: rebase-interactive: mark here-doc strings for translation, 2016-06-17) for the commit that added these eval_ngettext() wrappers.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 git-sh-i18n.sh | 12 ------------
 1 file changed, 12 deletions(-)
diff --git a/git-sh-i18n.sh b/git-sh-i18n.sh
index e3d9f4836db..a15c0620db6 100644
--- a/git-sh-i18n.sh
+++ b/git-sh-i18n.sh
@@ -51,12 +51,6 @@ gettext_without_eval_gettext)
 		)
 	}
 
-	eval_ngettext () {
-		ngettext "$1" "$2" "$3" | (
-			export PATH $(git sh-i18n--envsubst --variables "$2");
-			git sh-i18n--envsubst "$2"
-		)
-	}
 	;;
 *)
 	gettext () {
@@ -70,12 +64,6 @@ gettext_without_eval_gettext)
 		)
 	}
 
-	eval_ngettext () {
-		(test "$3" = 1 && printf "%s" "$1" || printf "%s" "$2") | (
-			export PATH $(git sh-i18n--envsubst --variables "$2");
-			git sh-i18n--envsubst "$2"
-		)
-	}
 	;;
 esac
 
-- 
2.33.1.1494.g88b39a443e1
Previous: Ævar Arnfjörð Bjarmason
Message 3 of 3 in “remove code that's dead post-rebase --preserve-merges removal”
  1. 0/2 remove code that's dead post-rebase --preserve-merges removalÆvar Arnfjörð Bjarmason, Oct 21, 2021
  2. 2/2 git-sh-setup: remove messaging supporting --preserve-mergesÆvar Arnfjörð Bjarmason, Oct 21, 2021
  3. 1/2 git-sh-i18n: remove unused eval_ngettext()Ævar Arnfjörð Bjarmason, Oct 21, 2021

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.