aboutsummaryrefslogtreecommitdiff
path: root/Documentation/git-sh-i18n--envsubst.txt
Commit message (Collapse)AuthorAge
* correct a few doubled-word nits in comments and documentationJim Meyering2012-03-28
| | | | | | | | | | | | | | | | | | | Found by running this command: $ git ls-files -z|xargs -0 perl -0777 -n \ -e 'while (/\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\s+\1\b/gims)' \ -e ' {' \ -e ' $n = ($` =~ tr/\n/\n/ + 1);' \ -e ' ($v = $&) =~ s/\n/\\n/g;' \ -e ' print "$ARGV:$n:$v\n";' \ -e ' }' Why not just git grep -E ...? That wouldn't work then the doubled words are separated by a newline. This is derived from a Makefile syntax-check rule in gnulib's maint.mk: http://git.sv.gnu.org/cgit/gnulib.git/tree/top/maint.mk Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Documentation/i18n: quote double-dash for AsciiDocJonathan Nieder2011-06-29
| | | | | | | | | | | | | | | | | | | | | | | As explained in v1.7.3-rc0~13^2 (Work around em-dash handling in newer AsciiDoc, 2010-08-23), if double dashes in names of commands are not escaped, AsciiDoc renders them as em dashes. While fixing that, spell the command name as "git sh-i18n--envsubst" (2 words) instead of emphasizing the name of the binary (one hyphenated name) and format it in italics. The double-dash in the title should be escaped, too, to avoid spurious em dashes in the header: .TH "GIT\-SH\-I18N\(emENVSUB" "1" "06/26/2011" "Git 1\&.7\&.6" "Git Manual" AsciiDoc 8.6.4 with DocBook XSL 1.76.0-RC1 copes fine and writes "GIT\-SH\-I18N\-\-ENVSUB" even without this change, which is why it was missed before. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-sh-i18n--envsubst: add SYNOPSIS section to the documentationÆvar Arnfjörð Bjarmason2011-05-30
| | | | | | | | | | | | | | | | | Change the documentation for the git-sh-i18n--envsubst program to include a SYNOPSIS section. Include the invocation of the program from git-sh-i18n.sh. Not having a SYNOPSIS section caused the "doc" target to fail on Centos 5.5 with asciidoc 8.2.5, while building with 8.6.4 on Debian works just fine. The relevant error was: ERROR: git-sh-i18n--envsubst.txt: line 9: second section must be named SYNOPSIS Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-sh-i18n--envsubst: our own envsubst(1) for eval_gettext()Ævar Arnfjörð Bjarmason2011-05-14
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>