]> git.ipfire.org Git - thirdparty/git.git/commit - Makefile
perl: use mock i18n functions under NO_GETTEXT=Y
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Wed, 5 May 2021 12:21:41 +0000 (14:21 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 6 May 2021 03:58:33 +0000 (12:58 +0900)
commit256c2dc42c812e4868532b88155f60f0a269c821
tree06998ea8aec9590370e0ddc2503cedc43247c876
parent368a50d9eea16e8e1181ce12d5c3c1d50216b688
perl: use mock i18n functions under NO_GETTEXT=Y

Change the logic of the i18n functions I added in 5e9637c6297 (i18n:
add infrastructure for translating Git with gettext, 2011-11-18) to
use pass-through functions when NO_GETTEXT is defined.

This speeds up the compilation time of commands that use this library
when NO_GETTEXT=Y is in effect. Loading it and POSIX.pm is around 20ms
on my machine, whereas it takes 2ms to just instantiate perl itself.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
perl/Git/I18N.pm