Ævar Arnfjörð Bjarmason
ba67aaf2d0
git-sh-i18n--envsubst: our own envsubst(1) for eval_gettext()
...
Add a git-sh-i18n--envsubst program which is a stripped-down version
of the GNU envsubst(1) program that comes with GNU gettext for use in
the eval_gettext() fallback.
We need a C helper program because implementing eval_gettext() purely
in shell turned out to be unworkable. Digging through the Git mailing
list archives will reveal two shell implementations of eval_gettext
that are almost good enough, but fail on an edge case which is tested
for in the tests which are part of this patch.
These are the modifications I made to envsubst.c as I turned it into
sh-i18n--envsubst.c:
* Added our git-compat-util.h header for xrealloc() and friends.
* Removed inclusion of gettext-specific headers.
* Removed most of main() and replaced it with my own. The modified
version only does option parsing for --variables. That's all it
needs.
* Modified error() invocations to use our error() instead of
error(3).
* Replaced the gettext XNMALLOC(n, size) macro with just
xmalloc(n). Since XNMALLOC() only allocated char's.
* Removed the string_list_destroy function. It's redundant (also in
the upstream code).
* Replaced the use of stdbool.h (a C99 header) by doing the following
replacements on the code:
* s/bool/unsigned short int/g
* s/true/1/g
* s/false/0/g
Reported-by: Johannes Sixt <j.sixt@viscovery.net >
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com >
Signed-off-by: Junio C Hamano <gitster@pobox.com >
2011-05-14 20:29:05 -07:00
..
2011-02-09 14:03:51 -08:00
2011-05-06 11:13:08 -07:00
2011-04-01 16:23:55 -07:00
2010-09-03 09:43:42 -07:00
2010-05-07 09:34:59 -07:00
2011-02-15 11:53:00 -08:00
2011-05-06 10:49:57 -07:00
2011-04-06 15:24:10 -07:00
2010-01-31 10:24:53 -08:00
2011-03-08 14:44:07 -08:00
2011-05-06 10:49:53 -07:00
2010-08-20 10:53:56 -07:00
2010-11-03 09:19:10 -07:00
2011-03-09 13:10:35 -08:00
2011-05-04 14:52:30 -07:00
2011-03-22 14:56:13 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-04-14 12:26:45 -07:00
2010-08-20 14:16:51 -07:00
2011-04-01 16:23:15 -07:00
2011-04-05 20:08:41 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2010-10-13 19:10:55 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-05-04 15:51:35 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-19 21:48:19 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-19 23:24:27 -07:00
2011-03-11 10:59:16 -05:00
2011-05-05 10:18:18 -07:00
2011-03-11 10:59:16 -05:00
2011-04-13 11:59:11 -07:00
2011-04-01 17:45:59 -07:00
2011-03-11 10:59:16 -05:00
2011-03-09 12:22:15 -08:00
2011-05-04 15:51:41 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-30 13:17:07 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2010-03-30 16:49:19 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-04-15 13:28:03 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-19 21:48:19 -07:00
2011-03-11 10:59:16 -05:00
2011-03-30 11:36:51 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-05-04 15:51:37 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-04-01 17:57:16 -07:00
2011-03-11 10:59:16 -05:00
2011-03-19 23:24:27 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-30 13:13:52 -07:00
2011-04-13 11:59:11 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-04-04 15:02:01 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-04-28 14:11:39 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-02-17 11:49:54 -08:00
2011-01-04 11:23:42 -08:00
2011-03-11 10:59:16 -05:00
2011-04-06 10:38:14 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-19 23:24:48 -07:00
2011-03-11 10:59:16 -05:00
2011-03-26 20:13:17 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-04-15 13:28:03 -07:00
2011-03-11 10:59:16 -05:00
2011-05-14 20:29:05 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-05-02 15:58:36 -07:00
2011-05-04 15:51:43 -07:00
2011-03-11 10:59:16 -05:00
2011-03-28 14:17:17 -07:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-05-06 11:00:46 -07:00
2011-03-18 09:58:47 -07:00
2011-03-11 10:59:16 -05:00
2010-10-13 19:10:55 -07:00
2010-08-31 14:28:20 -07:00
2011-01-10 09:09:02 -08:00
2011-03-11 10:59:16 -05:00
2011-03-11 10:59:16 -05:00
2011-04-04 15:02:01 -07:00
2010-07-20 16:59:17 -07:00
2010-07-05 13:39:02 -07:00
2010-11-03 09:18:58 -07:00
2010-11-03 09:19:08 -07:00
2011-02-03 13:22:58 -08:00
2010-09-09 16:17:59 -07:00
2010-11-24 15:13:58 -08:00
2011-04-01 17:57:16 -07:00
2011-02-21 10:24:08 -08:00
2010-10-26 21:54:04 -07:00
2010-06-16 14:45:09 -07:00
2011-03-30 11:36:51 -07:00
2011-04-26 13:13:20 -07:00
2011-04-04 16:43:57 -07:00
2011-04-15 13:28:03 -07:00
2010-07-20 16:59:17 -07:00
2010-11-03 09:20:48 -07:00