{"thread":{"id":"25597","subject":"[PATCH 072/161] gettextize: git-push \"prevent you from losing\" message","startedAt":"2010-10-30T08:16:09Z","lastAt":"2010-10-30T08:16:10Z","messageCount":2,"participants":["Ævar Arnfjörð Bjarmason"],"isPatch":true,"patchVersion":1,"patchTotal":161},"messages":[{"id":"154843","messageId":"1288426571-7072-1-git-send-email-avarab@gmail.com","threadId":"25597","inReplyTo":null,"subject":"[PATCH 000/161] [PULL] Updated + rebased ab/i18n","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-10-30T08:16:09Z","receivedAt":"2010-10-30T08:16:09Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Please pull an updated ab/i18n. The version you have now should be\nejected in favor of it:\n\n    git://github.com/avar/git.git ab/i18n\n\nThe changes are:\n\n * Trivial merge conflict resolution\n * Change to skip a test & update the German translation. Further\n   noted in patches that follow.\n\nWhat I haven't done (little time, sorry):\n\n * Solve the bug in the eval_gettext() that Johannes Sixt\n   noted. Gettext itself gets around this by using envsubst(1).\n\n   I haven't found a way to solve this bug (but haven't tried really\n   hard) in pure shellscript. Maybe we should just ship envsubst?\n\n * Split up the series into something more easily digestable as was\n   suggested in the \"Stable ab/i18n branch\" thread.\n\n\nErik Faye-Lund (1):\n  gettext.c: use libcharset.h instead of langinfo.h when available\n\nJan Engelhardt (1):\n  po/de.po: complete German translation\n\nJan Krüger (1):\n  po/de.po: add German translation\n\nMarcin Cieślak (1):\n  po/pl.po: add Polish translation\n\nPeter Krefting (1):\n  po/sv.po: add Swedish translation\n\nRamkumar Ramachandra (1):\n  po/hi.po: add Hindi Translation\n\nSam Reed (1):\n  po/en_GB.po: add British English translation\n\nThomas Rast (1):\n  gettext tests: locate i18n lib&data correctly under --valgrind\n\nÆvar Arnfjörð Bjarmason (153):\n  t7004-tag.sh: re-arrange git tag comment for clarity\n  tests: use test_cmp instead of piping to diff(1)\n  builtin: use builtin.h for all builtin commands\n  gettext: add infrastructure for translating Git with gettext\n  gettext tests: rename test to work around GNU gettext bug\n  gettext: setlocale(LC_CTYPE, \"\") breaks Git's C function assumptions\n  Makefile: A variable for options used by xgettext(1) calls\n  Makefile: provide a --msgid-bugs-address to xgettext(1)\n  Makefile: tell xgettext(1) that our source is in UTF-8\n  Makefile: use variables and shorter lines for xgettext\n  builtin.h: Include gettext.h\n  gettext.c: work around us not using setlocale(LC_CTYPE, \"\")\n  gettext tests: add GETTEXT_POISON=YesPlease Makefile parameter\n  gettext tests: skip lib-gettext.sh tests under GETTEXT_POISON\n  gettextize: git-init basic messages\n  gettextize: git-init \"Initialized [...] repository\" message\n  gettext tests: test if $VERSION exists before using it\n  gettext tests: add detection for is_IS.ISO-8859-1 locale\n  gettext tests: test message re-encoding under Shell\n  gettext tests: test re-encoding with a UTF-8 msgid under Shell\n  gettext tests: mark a test message as not needing translation\n  po/is.po: add Icelandic translation\n  gettext tests: test message re-encoding under C\n  gettextize: git-clone basic messages\n  gettextize: git-clone \"Cloning into\" message\n  gettextize: git-add basic messages\n  gettextize: git-add \"no files added\" message\n  gettextize: git-add \"Use -f if you really want\" message\n  gettextize: git-add \"pathspec [...] did not match\" message\n  gettextize: git-add \"remove '%s'\" message\n  gettextize: git-add refresh_index message\n  gettextize: git-branch basic messages\n  gettextize: git-branch \"remote branch '%s' not found\" message\n  gettextize: git-branch \"Deleted branch [...]\" message\n  gettextize: git-branch \"git branch -v\" messages\n  gettextize: git-branch \"(no branch)\" message\n  gettextize: git-checkout basic messages\n  gettextize: git-checkout: our/their version message\n  gettextize: git-checkout describe_detached_head messages\n  gettextize: git-checkout \"HEAD is now at\" message\n  gettextize: git-checkout \"Switched to a .. branch\" message\n  gettextize: git-commit basic messages\n  gettextize: git-commit \"middle of a merge\" message\n  gettextize: git-commit formatting messages\n  gettextize: git-commit print_summary messages\n  gettextize: git-commit \"enter the commit message\" message\n  gettextize: git-commit advice messages\n  gettextize: git-diff basic messages\n  gettextize: git-fetch basic messages\n  gettextize: git-fetch formatting messages\n  gettextize: git-fetch update_local_ref messages\n  gettextize: git-fetch split up \"(non-fast-forward)\" message\n  gettextize: git-grep basic messages\n  gettextize: git-grep \"--open-files-in-pager\" message\n  gettextize: git-log basic messages\n  gettextize: git-log \"--OPT does not make sense\" messages\n  gettextize: git-merge basic messages\n  gettextize: git-merge \"Updating %s..%s\" message\n  gettextize: git-merge \"You have not concluded your merge\" messages\n  gettextize: git-merge \"Wonderful\" message\n  gettextize: git-mv basic messages\n  gettextize: git-mv \"bad\" messages\n  gettextize: git-rm basic messages\n  gettextize: git-reset basic messages\n  gettextize: git-reset reset_type_names messages\n  gettextize: git-reset \"Unstaged changes after reset\" message\n  gettextize: git-tag basic messages\n  gettextize: git-tag tag_template message\n  gettextize: git-push basic messages\n  gettextize: git-push \"prevent you from losing\" message\n  gettextize: git-status basic messages\n  gettextize: git-status \"nothing to commit\" messages\n  gettextize: git-status shortstatus messages\n  gettextize: git-status \"Changes to be committed\" message\n  gettextize: git-status \"Initial commit\" message\n  gettextize: git-status \"renamed: \" message\n  gettextize: git-archive basic messages\n  gettextize: git-bundle basic messages\n  gettextize: git-clean basic messages\n  gettextize: git-clean clean.requireForce messages\n  gettextize: git-describe basic messages\n  gettextize: git-gc basic messages\n  gettextize: git-gc \"Auto packing the repository\" message\n  gettextize: git-notes basic commands\n  gettextize: git-notes GIT_NOTES_REWRITE_MODE error message\n  gettextize: git-notes \"Refusing to %s notes in %s\" message\n  gettextize: git-revert basic messages\n  gettextize: git-revert \"Your local changes\" message\n  gettextize: git-revert literal \"me\" messages\n  gettextize: git-revert split up \"could not revert/apply\" message\n  gettextize: git-shortlog basic messages\n  Makefile: add GNU_GETTEXT, set when we expect GNU gettext\n  Makefile: MSGFMT=\"msgfmt --check\" under GNU_GETTEXT\n  gettext tests: add GETTEXT_POISON support for shell scripts\n  gettext tests: add GETTEXT_POISON tests for shell scripts\n  gettextize: git-am add git-sh-i18n\n  gettextize: git-am one-line gettext $msg; echo\n  gettextize: git-am multi-line getttext $msg; echo\n  gettextize: git-am eval_gettext messages\n  gettextize: git-am die messages\n  gettextize: git-am cannot_fallback messages\n  gettextize: git-am clean_abort messages\n  gettextize: git-am \"Apply?\" message\n  gettextize: git-am core say messages\n  gettextize: git-am printf(1) message to eval_gettext\n  gettext docs: add po/README file documenting Git's gettext\n  Makefile: only add gettext tests on XGETTEXT_INCLUDE_TESTS=YesPlease\n  gettext docs: add a \"Testing your changes\" section to po/README\n  gettext docs: add \"Marking strings for translation\" section in\n    po/README\n  gettext docs: the gettext.h C interface\n  gettext docs: the git-sh-i18n.sh Shell interface\n  gettext docs: the Git::I18N Perl interface\n  gettext docs: add \"Testing marked strings\" section to po/README\n  gettextize: git-pull add git-sh-i18n\n  gettextize: git-pull die messages\n  gettextize: git-pull eval_gettext + die message\n  gettextize: git-pull eval_gettext + warning message\n  gettextize: git-pull split up \"no candidate\" message\n  gettextize: git-pull \"You asked to pull\" message\n  gettextize: git-pull \"[...] not currently on a branch\" message\n  gettextize: git-pull \"rebase against\" / \"merge with\" messages\n  gettextize: git-submodule add git-sh-i18n\n  gettextize: git-submodule echo + eval_gettext messages\n  gettextize: git-submodule say + eval_gettext messages\n  gettextize: git-submodule die + eval_gettext messages\n  gettextize: git-submodule $update_module say + die messages\n  gettextize: git-submodule \"cached cannot be used\" message\n  gettextize: git-submodule \"Submodule change[...]\" messages\n  gettextize: git-submodule $errmsg messages\n  gettextize: git-submodule \"Entering [...]\" message\n  gettextize: git-submodule \"[...] path is ignored\" message\n  gettextize: git-submodule \"path not initialized\" message\n  gettextize: git-submodule \"blob\" and \"submodule\" messages\n  gettextize: git-stash add git-sh-i18n\n  gettextize: git-stash echo + gettext message\n  gettextize: git-stash say + gettext messages\n  gettextize: git-stash die + gettext messages\n  gettextize: git-stash die + eval_gettext messages\n  gettextize: git-stash die + eval_gettext $* messages\n  gettextize: git-stash die + eval_gettext $1 messages\n  gettextize: git-stash \"unknown option\" message\n  gettextize: git-stash drop_stash say/die messages\n  gettextize: git-bisect add git-sh-i18n\n  gettextize: git-bisect gettext + echo message\n  gettextize: git-bisect echo + gettext messages\n  gettextize: git-bisect echo + eval_gettext message\n  gettextize: git-bisect die + gettext messages\n  gettextize: git-bisect die + eval_gettext messages\n  gettextize: git-bisect bisect_run + $@ messages\n  gettextize: git-bisect bisect_reset + $1 messages\n  gettextize: git-bisect bisect_replay + $1 messages\n  gettextize: git-bisect [Y/n] messages\n  gettextize: git-bisect bisect_next_check \"You need to\" message\n\n .gitignore                          |    2 +\n Documentation/CodingGuidelines      |    7 +\n INSTALL                             |   12 +\n Makefile                            |  131 ++-\n builtin.h                           |    1 +\n builtin/add.c                       |   46 +-\n builtin/archive.c                   |   14 +-\n builtin/branch.c                    |   69 +-\n builtin/bundle.c                    |    6 +-\n builtin/checkout.c                  |   93 +-\n builtin/clean.c                     |   33 +-\n builtin/clone.c                     |   64 +-\n builtin/commit.c                    |  156 +-\n builtin/describe.c                  |   36 +-\n builtin/diff.c                      |   20 +-\n builtin/fetch-pack.c                |    2 +-\n builtin/fetch.c                     |   82 +-\n builtin/gc.c                        |   24 +-\n builtin/grep.c                      |   34 +-\n builtin/hash-object.c               |    2 +-\n builtin/index-pack.c                |    2 +-\n builtin/init-db.c                   |   56 +-\n builtin/log.c                       |   68 +-\n builtin/merge-index.c               |    2 +-\n builtin/merge-recursive.c           |    2 +-\n builtin/merge-tree.c                |    2 +-\n builtin/merge.c                     |  122 +-\n builtin/mktag.c                     |    2 +-\n builtin/mv.c                        |   32 +-\n builtin/notes.c                     |  134 +-\n builtin/pack-redundant.c            |    2 +-\n builtin/pack-refs.c                 |    2 +-\n builtin/patch-id.c                  |    2 +-\n builtin/push.c                      |   42 +-\n builtin/receive-pack.c              |    2 +-\n builtin/remote.c                    |    3 +-\n builtin/reset.c                     |   44 +-\n builtin/revert.c                    |   75 +-\n builtin/rm.c                        |   22 +-\n builtin/send-pack.c                 |    2 +-\n builtin/shortlog.c                  |    8 +-\n builtin/tag.c                       |   66 +-\n builtin/unpack-file.c               |    2 +-\n builtin/var.c                       |    2 +-\n config.mak.in                       |    3 +\n configure.ac                        |   18 +\n daemon.c                            |    3 +\n fast-import.c                       |    3 +\n gettext.c                           |   35 +\n gettext.h                           |   22 +\n git-am.sh                           |   68 +-\n git-bisect.sh                       |   84 +-\n git-pull.sh                         |  147 +-\n git-sh-i18n.sh                      |   76 +\n git-stash.sh                        |   75 +-\n git-submodule.sh                    |   94 +-\n git.c                               |    3 +\n http-backend.c                      |    3 +\n http-fetch.c                        |    3 +\n http-push.c                         |    3 +\n imap-send.c                         |    3 +\n perl/Git/I18N.pm                    |   91 +\n perl/Makefile                       |    3 +-\n perl/Makefile.PL                    |   14 +-\n po/.gitignore                       |    1 +\n po/README                           |  209 ++\n po/de.po                            | 3609 +++++++++++++++++++++++++++++++++++\n po/en_GB.po                         | 2784 +++++++++++++++++++++++++++\n po/hi.po                            | 2787 +++++++++++++++++++++++++++\n po/is.po                            |  194 ++\n po/pl.po                            | 2793 +++++++++++++++++++++++++++\n po/sv.po                            | 3492 +++++++++++++++++++++++++++++++++\n shell.c                             |    3 +\n show-index.c                        |    3 +\n t/lib-gettext.sh                    |   68 +\n t/lib-httpd.sh                      |    2 +-\n t/t0001-init.sh                     |    2 +-\n t/t0200-gettext-basic.sh            |  108 ++\n t/t0200/test.c                      |   23 +\n t/t0200/test.perl                   |   14 +\n t/t0200/test.sh                     |   14 +\n t/t0201-gettext-fallbacks.sh        |   49 +\n t/t0202-gettext-perl.sh             |   27 +\n t/t0202/test.pl                     |  109 ++\n t/t0203-gettext-setlocale-sanity.sh |   26 +\n t/t0204-gettext-reencode-sanity.sh  |   78 +\n t/t0205-gettext-poison.sh           |   36 +\n t/t1200-tutorial.sh                 |    5 +-\n t/t2200-add-update.sh               |    2 +-\n t/t2204-add-ignored.sh              |   37 +-\n t/t3030-merge-recursive.sh          |    2 +-\n t/t3200-branch.sh                   |    2 +-\n t/t3203-branch-output.sh            |    2 +-\n t/t3501-revert-cherry-pick.sh       |    2 +-\n t/t3507-cherry-pick-conflict.sh     |    2 +-\n t/t3700-add.sh                      |   11 +-\n t/t4001-diff-rename.sh              |    4 +-\n t/t4014-format-patch.sh             |    2 +-\n t/t4041-diff-submodule-option.sh    |   96 +-\n t/t4150-am.sh                       |    5 +-\n t/t4151-am-abort.sh                 |    2 +-\n t/t5541-http-push.sh                |    7 +-\n t/t5601-clone.sh                    |    2 +-\n t/t6040-tracking-info.sh            |    2 +-\n t/t6120-describe.sh                 |    2 +-\n t/t7004-tag.sh                      |   21 +-\n t/t7012-skip-worktree-writing.sh    |    4 +-\n t/t7060-wtstatus.sh                 |    2 +-\n t/t7102-reset.sh                    |    2 +-\n t/t7110-reset-merge.sh              |    6 +-\n t/t7201-co.sh                       |   10 +-\n t/t7300-clean.sh                    |    6 +-\n t/t7400-submodule-basic.sh          |    4 +-\n t/t7401-submodule-summary.sh        |   59 +-\n t/t7407-submodule-foreach.sh        |    4 +-\n t/t7500-commit.sh                   |    6 +-\n t/t7501-commit.sh                   |    7 +-\n t/t7502-commit.sh                   |   60 +-\n t/t7506-status-submodule.sh         |   28 +-\n t/t7508-status.sh                   |  115 +-\n t/t7600-merge.sh                    |    2 +-\n t/t7811-grep-open.sh                |    2 +-\n t/test-lib.sh                       |   10 +\n upload-pack.c                       |    3 +\n wt-status.c                         |  118 +-\n 125 files changed, 18223 insertions(+), 1145 deletions(-)\n create mode 100644 gettext.c\n create mode 100644 gettext.h\n create mode 100644 git-sh-i18n.sh\n create mode 100644 perl/Git/I18N.pm\n create mode 100644 po/.gitignore\n create mode 100644 po/README\n create mode 100644 po/de.po\n create mode 100644 po/en_GB.po\n create mode 100644 po/hi.po\n create mode 100644 po/is.po\n create mode 100644 po/pl.po\n create mode 100644 po/sv.po\n create mode 100644 t/lib-gettext.sh\n create mode 100755 t/t0200-gettext-basic.sh\n create mode 100644 t/t0200/test.c\n create mode 100644 t/t0200/test.perl\n create mode 100644 t/t0200/test.sh\n create mode 100755 t/t0201-gettext-fallbacks.sh\n create mode 100755 t/t0202-gettext-perl.sh\n create mode 100644 t/t0202/test.pl\n create mode 100755 t/t0203-gettext-setlocale-sanity.sh\n create mode 100755 t/t0204-gettext-reencode-sanity.sh\n create mode 100755 t/t0205-gettext-poison.sh\n\n-- \n1.7.3.1.50.g1e633\n"},{"id":"154842","messageId":"1288426571-7072-2-git-send-email-avarab@gmail.com","threadId":"25597","inReplyTo":"1288426571-7072-1-git-send-email-avarab@gmail.com","subject":"[PATCH 072/161] gettextize: git-push \"prevent you from losing\" message","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-10-30T08:16:10Z","receivedAt":"2010-10-30T08:16:10Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Gettextize the \"To prevent you from losing history\" message. A test in\nlib-httpd.sh and another in t5541-http-push.sh explicitly checked for\nthis message. Change them to skip under GETTEXT_POISON=YesPlease.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n\nI've modified this to skip an additional test in t/t5541-http-push.sh\nthat started failing after recent modifications to that file in\nupstream.\n\n builtin/push.c       |    4 ++--\n t/lib-httpd.sh       |    2 +-\n t/t5541-http-push.sh |    7 +++++--\n 3 files changed, 8 insertions(+), 5 deletions(-)\n\ndiff --git a/builtin/push.c b/builtin/push.c\nindex 513bc57..8c8d8c7 100644\n--- a/builtin/push.c\n+++ b/builtin/push.c\n@@ -129,9 +129,9 @@ static int push_with_options(struct transport *transport, int flags)\n \t\treturn 0;\n \n \tif (nonfastforward && advice_push_nonfastforward) {\n-\t\tfprintf(stderr, \"To prevent you from losing history, non-fast-forward updates were rejected\\n\"\n+\t\tfprintf(stderr, _(\"To prevent you from losing history, non-fast-forward updates were rejected\\n\"\n \t\t\t\t\"Merge the remote changes (e.g. 'git pull') before pushing again.  See the\\n\"\n-\t\t\t\t\"'Note about fast-forwards' section of 'git push --help' for details.\\n\");\n+\t\t\t\t\"'Note about fast-forwards' section of 'git push --help' for details.\\n\"));\n \t}\n \n \treturn 1;\ndiff --git a/t/lib-httpd.sh b/t/lib-httpd.sh\nindex e733f65..817b865 100644\n--- a/t/lib-httpd.sh\n+++ b/t/lib-httpd.sh\n@@ -154,7 +154,7 @@ test_http_push_nonff() {\n \t\tgrep \"^ ! \\[rejected\\][ ]*$BRANCH -> $BRANCH (non-fast-forward)$\" output\n \t'\n \n-\ttest_expect_success 'non-fast-forward push shows help message' '\n+\ttest_expect_success NO_GETTEXT_POISON 'non-fast-forward push shows help message' '\n \t\tgrep \"To prevent you from losing history, non-fast-forward updates were rejected\" \\\n \t\t\toutput\n \t'\ndiff --git a/t/t5541-http-push.sh b/t/t5541-http-push.sh\nindex b0c2a2c..b341d8b 100755\n--- a/t/t5541-http-push.sh\n+++ b/t/t5541-http-push.sh\n@@ -128,11 +128,14 @@ test_expect_success 'push fails for non-fast-forward refs unmatched by remote he\n \n \t# push master too; this ensures there is at least one '\"'push'\"' command to\n \t# the remote helper and triggers interaction with the helper.\n-\ttest_must_fail git push -v origin +master master:retsam >output 2>&1 &&\n+\ttest_must_fail git push -v origin +master master:retsam >output 2>&1'\n \n+test_expect_success 'push fails for non-fast-forward refs unmatched by remote helper: remote output' '\n \tgrep \"^ + [a-f0-9]*\\.\\.\\.[a-f0-9]* *master -> master (forced update)$\" output &&\n-\tgrep \"^ ! \\[rejected\\] *master -> retsam (non-fast-forward)$\" output &&\n+\tgrep \"^ ! \\[rejected\\] *master -> retsam (non-fast-forward)$\" output\n+'\n \n+test_expect_success NO_GETTEXT_POISON 'push fails for non-fast-forward refs unmatched by remote helper: our output' '\n \tgrep \"To prevent you from losing history, non-fast-forward updates were rejected\" \\\n \t\toutput\n '\n-- \n1.7.3.1.50.g1e633\n"}]}