Subject: Re: [PATCH v2 5/7] rebase: drop support for `--preserve-merges`

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Thu, 02 Sep 2021 16:34:43 +0200

On Wed, Sep 01 2021, Johannes Schindelin via GitGitGadget wrote:

>  git-rebase--preserve-merges.sh | 1057 --------------------------------

You could, but certainly don't have to, squash in the below. I.e. this
is the last user of eval_ngettext!

I mentioned in <[email-masked]> that I'd recently
come up with pretty much the same diff, that was because I was seeing
how much of the shellscript gettext support I could rip out.

This is a major step to getting a whole section of git's shellscript
support infrastructure out-of-tree, i.e. git-sh-i18n.sh, and the
sh-i18n--envsubst built-in helper.

If I then merge mirucam/git-bisect-work-part4-v6 &
gitster/ar/submodule-run-update-procedure along with this we'll have a
relatively small amount of gettext-in-sh code left, which should be
entirely gone before too long. Yay!

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