summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2016-06-17i18n: notes: mark strings for translationLibravatar Vasco Almeida2-5/+5
Mark strings of messages for the user as translatable. Update tests t3310-notes-merge-manual-resolve.sh and t3320-notes-merge-worktrees.sh to reflect new translatable messages. Tests that grep for .git/NOTES_MERGE_WORKTREE reflect the translatable string "Automatic notes merge failed. Fix conflicts in %s and [...]". Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-17i18n: bisect: mark strings for translationLibravatar Vasco Almeida1-11/+11
In the last message, involving Q_(), try to mark the message in such way that is suited for RTL (Right to Left) languages. Update test t6030-bisect-porcelain.sh to reflect the changes. Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-17t5523: use test_i18ngrep for negationLibravatar Vasco Almeida1-4/+4
Replace the first form with the second one: ! grep expected actual test_i18ngrep ! expected actual The latter syntax is supported by test_i18ngrep defined in t/test-lib.sh. Although the test already passes whether GETTEXT_POSION is enabled, use the i18n grep variant for the sake of consistency and also to make obvious that those strings are subject to i18n. Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-17t4153: fix negated test_i18ngrep callLibravatar Vasco Almeida1-1/+1
The function test_i18ngrep fakes success when run under GETTEXT_POISON. Hence, running in the following manner will always fail under gettext poison: ! test_i18ngrep expected actual Use correct syntax: test_i18ngrep ! expected actual For other instance of this issue see 41ca19b ("tests: fix negated test_i18ngrep calls", 2014-08-13). Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-17t9003: become resilient to GETTEXT_POISONLibravatar Vasco Almeida1-2/+2
The test t9003-help-autocorrect.sh fails when run under GETTEXT_POISON, because it's expecting to filter out the original output. Accommodate gettext poison case by also filtering out the default simulated output. Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-17tests: unpack-trees: update to use test_i18n* functionsLibravatar Vasco Almeida4-6/+6
Use functions test_i18ncmp and test_i18ngrep to successfully pass tests running under GETTEXT_POISON. The output strings compared to in these test were marked for translation in ed47fdf ("i18n: unpack-trees: mark strings for translation", 2016-04-09) and later improved in 2e3926b ("i18n: unpack-trees: avoid substituting only a verb in sentences", 2016-05-12). Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-17tests: use test_i18n* functions to suppress false positivesLibravatar Vasco Almeida21-44/+41
The test functions test_i18ncmp and test_i18ngrep pretend success if run under GETTEXT_POISON. By using those functions to test output which is correctly marked as translatable, enables one to detect if the strings newly marked for translation are from plumbing output. If they are indeed from plumbing, the test would fail, and the string should be unmarked, since it is not seen by users. Thus, it is productive to not have false positives when running the test under GETTEXT_POISON. This commit replaces normal test functions by their i18n aware variants in use-cases know to be correctly marked for translation, suppressing false positives. Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-17i18n: setup: mark strings for translationLibravatar Vasco Almeida2-3/+3
Update tests that compare the strings newly marked for translation to succeed when running under GETTEXT_POISON. Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-17i18n: rebase-interactive: mark comments of squash for translationLibravatar Vasco Almeida1-0/+1
Mark comment messages of squash/fixup file ($squash_msg) for translation. Helper functions this_nth_commit_message and skip_nth_commit_message replace the previous method of making the comment messages (such as "This is the 2nd commit message:") aided by nth_string helper function. This step was taken as a workaround to enabled translation of entire sentences. However, doesn't change any text seen in English by the user, except for string "The first commit's message is:" which was changed to match the style of other instances. The test t3404-rebase-interactive.sh resorts to set_fake_editor which didn't account for GETTEXT_POISON. Fix it by assuming success when we find dummy gettext poison output where was supposed to find the first comment line "This is a combination of $count commits.". For that same message, use plural aware eval_ngettext instead of eval_gettext, since other languages have more complex plural forms. Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-17i18n: rebase-interactive: mark here-doc strings for translationLibravatar Vasco Almeida1-7/+7
Use pipe to send gettext output to git stripspace instead of the original method of using shell here-document, because command substitution '$(...)' would not take place inside the here-documents. The exception is the case of the last here-document redirecting to cat, in which commands substitution works and, thus, is preserved in this commit. t3404: adapt test to the strings newly marked for translation Test t3404-rebase-interactive.sh would fail under GETTEXT_POISON unless using test_i18ngrep. Add eval_ngettext fallback functions to be called when running, for instance, under GETTEXT_POISON. Otherwise, tests would fail under GETTEXT_POISON, or other build that doesn't support the GNU gettext, because that function could not be found. Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-17t6030: update to use test_i18ncmpLibravatar Vasco Almeida1-2/+2
Since the git bisect output tested here is subject to translation, the helper function test_i18ncmp should be used over test_cmp. Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-17i18n: advice: internationalize message for conflictsLibravatar Vasco Almeida1-1/+1
Mark message for translation telling the user she has conflicts to resolve. Expose each particular use case, in order to enable translating entire sentences which would facilitate translating into other languages. Change "Pull" to lowercase to match other instances. Update test t5520-pull.sh, that relied on the old error message, to use the new one. Although we loose in source code conciseness, we would gain better translations because translators can 1) translate the entire sentence, including those terms concerning Git (committing, merging, etc) 2) have leeway to adapt to their languages. Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-17i18n: advice: mark string about detached head for translationLibravatar Vasco Almeida1-1/+1
Mark string with advice seen by the user when in detached head. Update test t7201-co.sh to pass under GETTEXT_POISON build. Pretend success if the number of lines of "git checkout renamer^" output is not greater than 1 and test are running under GETTEXT_POISON. Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-07Merge branch 'jc/t2300-setup' into HEADLibravatar Junio C Hamano1-1/+2
* jc/t2300-setup: t2300: run git-sh-setup in an environment that better mimics the real life More topics for 2.8.4
2016-06-01t2300: run git-sh-setup in an environment that better mimics the real lifeLibravatar Junio C Hamano1-1/+2
When we run scripted Porcelains, "git" potty has set up the $PATH by prepending $GIT_EXEC_PATH, the path given by "git --exec-path=$there $cmd", etc. already. Because of this, scripted Porcelains can dot-source shell script library like git-sh-setup with simple dot without specifying any path. t2300 however dot-sources git-sh-setup without adjusting $PATH like the real "git" potty does. This has not been a problem so far, but once git-sh-setup wants to rely on the $PATH adjustment, just like any scripted Porcelains already do, it would become one. It cannot for example dot-source another shell library without specifying the full path to it by prefixing $(git --exec-path). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-31Merge branch 'sb/submodule-deinit-all' into maintLibravatar Junio C Hamano1-1/+23
Correct faulty recommendation to use "git submodule deinit ." when de-initialising all submodules, which would result in a strange error message in a pathological corner case. * sb/submodule-deinit-all: submodule deinit: require '--all' instead of '.' for all submodules
2016-05-31Merge branch 'jk/test-send-sh-x-trace-elsewhere' into maintLibravatar Junio C Hamano2-3/+16
Running tests with '-x' option to trace the individual command executions is a useful way to debug test scripts, but some tests that capture the standard error stream and check what the command said can be broken with the trace output mixed in. When running our tests under "bash", however, we can redirect the trace output to another file descriptor to keep the standard error of programs being tested intact. * jk/test-send-sh-x-trace-elsewhere: test-lib: set BASH_XTRACEFD automatically
2016-05-31Merge branch 'js/name-rev-use-oldest-ref' into maintLibravatar Junio C Hamano1-1/+1
"git describe --contains" often made a hard-to-justify choice of tag to give name to a given commit, because it tried to come up with a name with smallest number of hops from a tag, causing an old commit whose close descendant that is recently tagged were not described with respect to an old tag but with a newer tag. It did not help that its computation of "hop" count was further tweaked to penalize being on a side branch of a merge. The logic has been updated to favor using the tag with the oldest tagger date, which is a lot easier to explain to the end users: "We describe a commit in terms of the (chronologically) oldest tag that contains the commit." * js/name-rev-use-oldest-ref: name-rev: include taggerdate in considering the best name
2016-05-26Merge branch 'jc/fsck-nul-in-commit' into maintLibravatar Junio C Hamano1-0/+18
"git fsck" learned to catch NUL byte in a commit object as potential error and warn. * jc/fsck-nul-in-commit: fsck: detect and warn a commit with embedded NUL fsck_commit_buffer(): do not special case the last validation
2016-05-26Merge branch 'js/windows-dotgit' into maintLibravatar Junio C Hamano2-0/+50
On Windows, .git and optionally any files whose name starts with a dot are now marked as hidden, with a core.hideDotFiles knob to customize this behaviour. * js/windows-dotgit: mingw: remove unnecessary definition mingw: introduce the 'core.hideDotFiles' setting
2016-05-26Merge branch 'lp/typofixes' into maintLibravatar Junio C Hamano1-1/+1
Typofixes. * lp/typofixes: typofix: assorted typofixes in comments, documentation and messages
2016-05-26Merge branch 'sb/z-is-gnutar-ism' into maintLibravatar Junio C Hamano2-4/+4
Test fix. * sb/z-is-gnutar-ism: t6041: do not compress backup tar file t3513: do not compress backup tar file
2016-05-26Merge branch 'va/i18n-misc-updates' into maintLibravatar Junio C Hamano1-9/+9
Mark several messages for translation. * va/i18n-misc-updates: i18n: unpack-trees: avoid substituting only a verb in sentences i18n: builtin/pull.c: split strings marked for translation i18n: builtin/pull.c: mark placeholders for translation i18n: git-parse-remote.sh: mark strings for translation i18n: branch: move comment for translators i18n: branch: unmark string for translation i18n: builtin/rm.c: remove a comma ',' from string i18n: unpack-trees: mark strings for translation i18n: builtin/branch.c: mark option for translation i18n: index-pack: use plural string instead of normal one
2016-05-26Merge branch 'ak/t4151-ls-files-could-be-empty' into maintLibravatar Junio C Hamano1-1/+1
Test fix. * ak/t4151-ls-files-could-be-empty: t4151: make sure argument to 'test -z' is given
2016-05-26Merge branch 'jc/test-seq' into maintLibravatar Junio C Hamano1-15/+13
Test fix. * jc/test-seq: test-lib-functions.sh: rewrite test_seq without Perl test-lib-functions.sh: remove misleading comment on test_seq
2016-05-26Merge branch 'tb/t5601-sed-fix' into maintLibravatar Junio C Hamano1-1/+1
Test fix. * tb/t5601-sed-fix: t5601: Remove trailing space in sed expression
2016-05-23Merge branch 'da/difftool'Libravatar Junio C Hamano1-0/+23
"git difftool" learned to handle unmerged paths correctly in dir-diff mode. * da/difftool: difftool: handle unmerged files in dir-diff mode difftool: initialize variables for readability
2016-05-23Merge branch 'jk/test-z-n-unquoted'Libravatar Junio C Hamano13-111/+121
t9xxx series has been updated primarily for readability, while fixing small bugs in it. A few scripted Porcelains have also been updated to fix possible bugs around their use of "test -z" and "test -n". * jk/test-z-n-unquoted: always quote shell arguments to test -z/-n t9103: modernize test style t9107: switch inverted single/double quotes in test t9107: use "return 1" instead of "exit 1" t9100,t3419: enclose all test code in single-quotes t/lib-git-svn: drop $remote_git_svn and $git_svn_id
2016-05-23Merge branch 'ar/diff-args-osx-precompose'Libravatar Junio C Hamano1-0/+42
Many commands normalize command line arguments from NFD to NFC variant of UTF-8 on OSX, but commands in the "diff" family did not, causing "git diff $path" to complain that no such path is known to Git. They have been taught to do the normalization. * ar/diff-args-osx-precompose: diff: run arguments through precompose_argv
2016-05-23Merge branch 'js/perf-rebase-i'Libravatar Junio C Hamano2-8/+47
Add perf test for "rebase -i" * js/perf-rebase-i: perf: run "rebase -i" under perf perf: make the tests work in worktrees perf: let's disable symlinks when they are not available
2016-05-23Merge branch 'jc/test-parse-options-expect'Libravatar Junio C Hamano2-60/+93
t0040 had too many unnecessary repetitions in its test data. Teach test-parse-options program so that a caller can tell what it expects in its output, so that these repetitions can be cleaned up. * jc/test-parse-options-expect: t0040: convert a few tests to use test-parse-options --expect t0040: remove unused test helpers test-parse-options: --expect=<string> option to simplify tests test-parse-options: fix output when callback option fails
2016-05-23Merge branch 'pb/commit-verbose-config'Libravatar Junio C Hamano3-71/+244
"git commit" learned to pay attention to "commit.verbose" configuration variable and act as if "--verbose" option was given from the command line. * pb/commit-verbose-config: commit: add a commit.verbose config variable t7507-commit-verbose: improve test coverage by testing number of diffs parse-options.c: make OPTION_COUNTUP respect "unspecified" values t/t7507: improve test coverage t0040-parse-options: improve test coverage test-parse-options: print quiet as integer t0040-test-parse-options.sh: fix style issues
2016-05-23Merge branch 'xy/format-patch-base'Libravatar Junio C Hamano1-0/+105
"git format-patch" learned a new "--base" option to record what (public, well-known) commit the original series was built on in its output. * xy/format-patch-base: format-patch: introduce format.useAutoBase configuration format-patch: introduce --base=auto option format-patch: add '--base' option to record base tree info patch-ids: make commit_patch_id() a public helper function
2016-05-23Merge branch 'tb/core-eol-fix'Libravatar Junio C Hamano1-170/+131
A couple of bugs around core.autocrlf have been fixed. * tb/core-eol-fix: convert.c: ident + core.autocrlf didn't work t0027: test cases for combined attributes convert: allow core.autocrlf=input and core.eol=crlf t0027: make commit_chk_wrnNNO() reliable
2016-05-23Merge branch 'nd/worktree-various-heads'Libravatar Junio C Hamano1-0/+59
The experimental "multiple worktree" feature gains more safety to forbid operations on a branch that is checked out or being actively worked on elsewhere, by noticing that e.g. it is being rebased. * nd/worktree-various-heads: branch: do not rename a branch under bisect or rebase worktree.c: check whether branch is bisected in another worktree wt-status.c: split bisect detection out of wt_status_get_state() worktree.c: check whether branch is rebased in another worktree worktree.c: avoid referencing to worktrees[i] multiple times wt-status.c: make wt_status_check_rebase() work on any worktree wt-status.c: split rebase detection out of wt_status_get_state() path.c: refactor and add worktree_git_path() worktree.c: mark current worktree worktree.c: make find_shared_symref() return struct worktree * worktree.c: store "id" instead of "git_dir" path.c: add git_common_path() and strbuf_git_common_path() dir.c: rename str(n)cmp_icase to fspath(n)cmp
2016-05-23Merge branch 'ss/commit-dry-run-resolve-merge-to-no-op'Libravatar Junio C Hamano1-0/+20
"git commit --dry-run" reported "No, no, you cannot commit." in one case where "git commit" would have allowed you to commit, and this improves it a little bit ("git commit --dry-run --short" still does not give you the correct answer, for example). This is a stop-gap measure in that "commit --short --dry-run" still gives an incorrect result. * ss/commit-dry-run-resolve-merge-to-no-op: wt-status.c: set commitable bit if there is a meaningful merge.
2016-05-18Merge branch 'sb/clean-test-fix' into HEADLibravatar Junio C Hamano1-1/+1
* sb/clean-test-fix: t7300: mark test with SANITY
2016-05-18Merge branch 'sg/test-lib-simplify-expr-away' into HEADLibravatar Junio C Hamano1-5/+5
Code cleanup. * sg/test-lib-simplify-expr-away: test-lib: simplify '--option=value' parsing
2016-05-18Merge branch 'js/close-packs-before-gc' into HEADLibravatar Junio C Hamano1-0/+1
* js/close-packs-before-gc: t5510: run auto-gc in the foreground
2016-05-18Merge branch 'ls/p4-lfs' into HEADLibravatar Junio C Hamano1-0/+4
Recent update to Git LFS broke "git p4" by changing the output from its "lfs pointer" subcommand. * ls/p4-lfs: git-p4: fix Git LFS pointer parsing travis-ci: express Linux/OS X dependency versions more clearly travis-ci: update Git-LFS and P4 to the latest version
2016-05-18Merge branch 'ls/p4-lfs-test-fix-2.7.0' into HEADLibravatar Junio C Hamano1-1/+1
Fix a broken test. * ls/p4-lfs-test-fix-2.7.0: t9824: fix wrong reference value t9824: fix broken &&-chain in a subshell
2016-05-18Merge branch 'nf/mergetool-prompt' into HEADLibravatar Junio C Hamano1-1/+1
UI consistency improvements. * nf/mergetool-prompt: difftool/mergetool: make the form of yes/no questions consistent
2016-05-18Merge branch 'jk/push-client-deadlock-fix' into HEADLibravatar Junio C Hamano1-6/+4
Some Windows SDK lacks pthread_sigmask() implementation and fails to compile the recently updated "git push" codepath that uses it. * jk/push-client-deadlock-fix: Windows: only add a no-op pthread_sigmask() when needed Windows: add pthread_sigmask() that does nothing t5504: drop sigpipe=ok from push tests fetch-pack: isolate sigpipe in demuxer thread send-pack: isolate sigpipe in demuxer thread run-command: teach async threads to ignore SIGPIPE send-pack: close demux pipe before finishing async process
2016-05-18Merge branch 'sb/mv-submodule-fix' into HEADLibravatar Junio C Hamano1-0/+16
"git mv old new" did not adjust the path for a submodule that lives as a subdirectory inside old/ directory correctly. * sb/mv-submodule-fix: mv: allow moving nested submodules
2016-05-18Merge branch 'ld/p4-test-py3' into HEADLibravatar Junio C Hamano2-6/+7
The test scripts for "git p4" (but not "git p4" implementation itself) has been updated so that they would work even on a system where the installed version of Python is python 3. * ld/p4-test-py3: git-p4 tests: time_in_seconds should use $PYTHON_PATH git-p4 tests: work with python3 as well as python2 git-p4 tests: cd to / before running python
2016-05-17Merge branch 'js/windows-dotgit'Libravatar Junio C Hamano2-0/+50
On Windows, .git and optionally any files whose name starts with a dot are now marked as hidden, with a core.hideDotFiles knob to customize this behaviour. * js/windows-dotgit: mingw: remove unnecessary definition mingw: introduce the 'core.hideDotFiles' setting
2016-05-17Merge branch 'jk/test-send-sh-x-trace-elsewhere'Libravatar Junio C Hamano2-3/+16
Running tests with '-x' option to trace the individual command executions is a useful way to debug test scripts, but some tests that capture the standard error stream and check what the command said can be broken with the trace output mixed in. When running our tests under "bash", however, we can redirect the trace output to another file descriptor to keep the standard error of programs being tested intact. * jk/test-send-sh-x-trace-elsewhere: test-lib: set BASH_XTRACEFD automatically
2016-05-17Merge branch 'js/http-custom-headers'Libravatar Junio C Hamano2-6/+24
Update tests for "http.extraHeaders=<header>" to be portable back to Apache 2.2 (the original depended on <RequireAll/> which is a more recent feature). * js/http-custom-headers: submodule: ensure that -c http.extraheader is heeded t5551: make the test for extra HTTP headers more robust tests: adjust the configuration for Apache 2.2
2016-05-17Merge branch 'jc/fsck-nul-in-commit'Libravatar Junio C Hamano1-0/+18
"git fsck" learned to catch NUL byte in a commit object as potential error and warn. * jc/fsck-nul-in-commit: fsck: detect and warn a commit with embedded NUL fsck_commit_buffer(): do not special case the last validation
2016-05-17Merge branch 'jc/ll-merge-internal'Libravatar Junio C Hamano2-85/+3
"git rerere" can get confused by conflict markers deliberately left by the inner merge step, because they are indistinguishable from the real conflict markers left by the outermost merge which are what the end user and "rerere" need to look at. This was fixed by making the conflict markers left by the inner merges a bit longer. * jc/ll-merge-internal: t6036: remove pointless test that expects failure ll-merge: use a longer conflict marker for internal merge ll-merge: fix typo in comment