summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)Author
2013-08-05Merge branch 'es/blame-L-breakage'Junio C Hamano
* es/blame-L-breakage: t8001, t8002: fix "blame -L :literal" test on NetBSD
2013-08-05t8001, t8002: fix "blame -L :literal" test on NetBSDRené Scharfe
Sub-test 42 of t8001 and t8002 ("blame -L :literal") fails on NetBSD with the following verbose output: git annotate -L:main hello.c Author F (expected 4, attributed 3) bad Author G (expected 1, attributed 1) good This is not caused by different behaviour of git blame or annotate on that platform, but by different test input, in turn caused by a sed command that forgets to add a newline on NetBSD. Here's the diff of the commit that adds "goodbye" to hello.c, for Linux: @@ -1,4 +1,5 @@ int main(int argc, const char *argv[]) { puts("hello"); + puts("goodbye"); } We see that it adds an extra TAB, but that's not a problem. Here's the same on NetBSD: @@ -1,4 +1,4 @@ int main(int argc, const char *argv[]) { puts("hello"); -} + puts("goodbye");} It also adds an extra TAB, but it is missing the newline character after the semicolon. The following patch gets rid of the extra TAB at the beginning, but more importantly adds the missing newline at the end in a (hopefully) portable way, mentioned in http://sed.sourceforge.net/sedfaq4.html. The diff becomes this, on both Linux and NetBSD: @@ -1,4 +1,5 @@ int main(int argc, const char *argv[]) { puts("hello"); + puts("goodbye"); } Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-05Merge branch 'dn/test-reject-utf-16'Junio C Hamano
* dn/test-reject-utf-16: t3900: test rejecting log message with NULs correctly Add missing test file for UTF-16.
2013-08-05t3900: test rejecting log message with NULs correctlyJunio C Hamano
It is not like that our longer term desire is to someday start accept log messages with NULs in them, so it is wrong to mark a test that demonstrates "git commit" that correctly fails given such an input as "expect-failure". "git commit" should fail today, and it should fail the same way in the future given a message with NUL in it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-05Add missing test file for UTF-16.Brian M. Carlson
The test file that the UTF-16 rejection test looks for is missing, but this went unnoticed because the test is expected to fail anyway; as a consequence, the test fails because the file containing the commit message is missing, and not because the test file contains a NUL byte. Fix this by including a sample text file containing a commit message encoded in UTF-16. Signed-off-by: Brian M. Carlson <sandals@crustytoothpaste.net> Tested-by: Duy Nguyen <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-02Merge branch 'jk/cat-file-batch-optim'Junio C Hamano
* jk/cat-file-batch-optim: Revert "cat-file: split --batch input lines on whitespace"
2013-08-02Revert "cat-file: split --batch input lines on whitespace"Junio C Hamano
This reverts commit c334b87b30c1464a1ab563fe1fb8de5eaf0e5bac; the update assumed that people only used the command to read from "rev-list --objects" output, whose lines begin with a 40-hex object name followed by a whitespace, but it turns out that scripts feed random extended SHA-1 expressions (e.g. "HEAD:$pathname") in which a whitespace has to be kept.
2013-08-01Merge branch 'ob/typofixes'Junio C Hamano
* ob/typofixes: many small typofixes
2013-08-01Merge branch 'lf/echo-n-is-not-portable'Junio C Hamano
* lf/echo-n-is-not-portable: Avoid using `echo -n` anywhere
2013-08-01Merge branch 'jx/clean-interactive'Junio C Hamano
* jx/clean-interactive: git-clean: implement partial matching for selection Documentation/git-clean: fix description for range
2013-07-29many small typofixesOndřej Bílka
Signed-off-by: Ondřej Bílka <neleai@seznam.cz> Reviewed-by: Marc Branchaud <marcnarc@xiplink.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-29Avoid using `echo -n` anywhereLukas Fleischer
`echo -n` is non-portable. The POSIX specification says: Conforming applications that wish to do prompting without <newline> characters or that could possibly be expecting to echo a -n, should use the printf utility derived from the Ninth Edition system. Since all of the affected shell scripts use a POSIX shell shebang, replace `echo -n` invocations with printf. Signed-off-by: Lukas Fleischer <git@cryptocrack.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-25Merge branch 'ml/avoid-using-grep-on-crlf-files'Junio C Hamano
On systems that understand a CRLF as a line ending, tests in this script that worked on files with CRLF line endings using "grep" to extract matching lines may lose the CR at the end of lines that match, causing the actual output not to match the expected output. * ml/avoid-using-grep-on-crlf-files: test-lib.sh - define and use GREP_STRIPS_CR
2013-07-25Merge branch 'tr/line-log'Junio C Hamano
Fix "log -L" command line parsing bugs. * tr/line-log: t4211: fix incorrect rebase at f8395edc (range-set: satisfy non-empty ranges invariant) line-log: fix "log -LN" crash when N is last line of file range-set: satisfy non-empty ranges invariant t4211: demonstrate crash when first -L encountered is empty range t4211: demonstrate empty -L range crash range-set: fix sort_and_merge_range_set() corner case bug
2013-07-25git-clean: implement partial matching for selectionJiang Xin
Document for interactive git-clean says: "You also could say `c` or `clean` above as long as the choice is unique". But it's not true, because only hotkey `c` and full match (`clean`) could work. Implement partial matching via find_unique function to make the document right. Signed-off-by: Jiang Xin <worldhello.net@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-24t4211: fix incorrect rebase at f8395edc (range-set: satisfy non-empty ranges ↵Junio C Hamano
invariant) Wnen I rewrote "cat b.c | wc -l" into "wc -l <b.c" to squash in a suggestion on the list to this series, I screwed up subsequent rebase. Fix it up. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-23line-log: fix "log -LN" crash when N is last line of fileEric Sunshine
range-set invariants are: ranges must be (1) non-empty, (2) disjoint, (3) sorted in ascending order. line_log_data_insert() breaks the non-empty invariant under the following conditions: the incoming range is empty and the pathname attached to the range has not yet been encountered. In this case, line_log_data_insert() assigns the empty range to a new line_log_data record without taking any action to ensure that the empty range is eventually folded out. Subsequent range-set functions crash or throw an assertion failure upon encountering such an anomaly. Fix this bug. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Acked-by: Thomas Rast <trast@inf.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-23range-set: satisfy non-empty ranges invariantEric Sunshine
range-set invariants are: ranges must be (1) non-empty, (2) disjoint, (3) sorted in ascending order. During processing, various range-set utility functions break the invariants (for instance, by adding empty ranges), with the expectation that a finalizing sort_and_merge_range_set() will restore sanity. sort_and_merge_range_set(), however, neglects to fold out empty ranges, thus it fails to satisfy the non-empty constraint. Subsequent range-set functions crash or throw an assertion failure upon encountering such an anomaly. Rectify the situation by having sort_and_merge_range_set() fold out empty ranges. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Acked-by: Thomas Rast <trast@inf.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-23t4211: demonstrate crash when first -L encountered is empty rangeEric Sunshine
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Acked-by: Thomas Rast <trast@inf.ethz.ch> Helped-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-23t4211: demonstrate empty -L range crashEric Sunshine
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Acked-by: Thomas Rast <trast@inf.ethz.ch> Helped-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-23Merge branch 'mv/merge-ff-tristate'Junio C Hamano
* mv/merge-ff-tristate: t7600: fix typo in test title
2013-07-23t7600: fix typo in test titleJunio C Hamano
Spotted by Ram, confirmed by Miklos. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-22Sync with Git 1.8.3.4Junio C Hamano
2013-07-22Merge branch 'jc/name-rev-exact-ref'Junio C Hamano
Corrects the longstanding sloppiness in the implementation of name-rev that conflated "we take commit-ish" and "differences between tags and commits do not matter". * jc/name-rev-exact-ref: describe: fix --contains when a tag is given as input name-rev: differentiate between tags and commits they point at describe: use argv-array name-rev: allow converting the exact object name at the tip of a ref name-ref: factor out name shortening logic from name_ref()
2013-07-22Merge branch 'es/check-mailmap'Junio C Hamano
A new command to allow scripts to query the mailmap information. * es/check-mailmap: t4203: test check-mailmap command invocation builtin: add git-check-mailmap command
2013-07-22Merge branch 'jx/clean-interactive'Junio C Hamano
Add "interactive" mode to "git clean". The early part to refactor relative path related helper functions looked sensible. * jx/clean-interactive: test: run testcases with POSIX absolute paths on Windows test: add t7301 for git-clean--interactive git-clean: add documentation for interactive git-clean git-clean: add ask each interactive action git-clean: add select by numbers interactive action git-clean: add filter by pattern interactive action git-clean: use a git-add-interactive compatible UI git-clean: add colors to interactive git-clean git-clean: show items of del_list in columns git-clean: add support for -i/--interactive git-clean: refactor git-clean into two phases write_name{_quoted_relative,}(): remove redundant parameters quote_path_relative(): remove redundant parameter quote.c: substitute path_relative with relative_path path.c: refactor relative_path(), not only strip prefix test: add test cases for relative_path
2013-07-22Merge branch 'hv/config-from-blob'Junio C Hamano
Allow configuration data to be read from in-tree blob objects, which would help working in a bare repository and submodule updates. * hv/config-from-blob: do not die when error in config parsing of buf occurs teach config --blob option to parse config from database config: make parsing stack struct independent from actual data source config: drop cf validity check in get_next_char() config: factor out config file stack management
2013-07-22Merge branch 'jk/t0008-sigpipe-fix'Junio C Hamano
Fix for recent test breakage on 'master'. * jk/t0008-sigpipe-fix: t0008: avoid SIGPIPE race condition on fifo
2013-07-22Merge branch 'db/show-ref-head'Junio C Hamano
The "--head" option to "git show-ref" was only to add "HEAD" to the list of candidate refs to be filtered by the usual rules (e.g. "--heads" that only show refs under refs/heads). Change the meaning of the option to always show "HEAD" regardless of what filtering will be applied to any other ref (this is a backward incompatible change, so I may need to add an entry to the Release Notes). * db/show-ref-head: show-ref: make --head always show the HEAD ref
2013-07-22Merge branch 'es/blame-L-breakage'Junio C Hamano
The refactoring made for parsing "-L" option recently to support "git log -L" seems to have broken "git blame -L X,-5" to show 5 lines leading to X. * es/blame-L-breakage: blame-options.txt: explain that -L <start> and <end> are optional blame-options.txt: place each -L option variation on its own line t8001/t8002 (blame): add blame -L :funcname tests t8001/t8002 (blame): add blame -L tests t8001/t8002 (blame): modernize style line-range: fix "blame -L X,-N" regression
2013-07-22Merge branch 'mm/diff-no-patch-synonym-to-s'Junio C Hamano
"git show -s" was less discoverable than it should be. * mm/diff-no-patch-synonym-to-s: Documentation/git-log.txt: capitalize section names Documentation: move description of -s, --no-patch to diff-options.txt Documentation/git-show.txt: include common diff options, like git-log.txt diff: allow --patch & cie to override -s/--no-patch diff: allow --no-patch as synonym for -s t4000-diff-format.sh: modernize style
2013-07-22Merge branch 'jc/mailmap-case-insensitivity'Junio C Hamano
The mailmap mechanism unnecessarily downcased the e-mail addresses in the output, and also ignored the human name when it is a single character name. This now has become Eric Sunshine's series, even though it still is under jc/ hierarchy. * jc/mailmap-case-insensitivity: mailmap: style fixes mailmap: debug: avoid passing NULL to fprintf() '%s' conversion specification mailmap: debug: eliminate -Wformat field precision type warning mailmap: debug: fix malformed fprintf() format conversion specification mailmap: debug: fix out-of-order fprintf() arguments mailmap: do not downcase mailmap entries t4203: demonstrate loss of uppercase characters in canonical email mailmap: do not lose single-letter names t4203: demonstrate loss of single-character name in mailmap entry
2013-07-22Merge branch 'jc/simple-add-must-be-a-no-op'Junio C Hamano
This detected a mismerge of one of "add-2.0" topics to the 'jch' and 'pu' branches. * jc/simple-add-must-be-a-no-op: t2202: make sure "git add" (no args) stays a no-op
2013-07-22update URL to the marc.info mail archiveOndřej Bílka
The name marc.theaimsgroup.com is no longer active, and has migrated to marc.info. Signed-off-by: Ondřej Bílka <neleai@seznam.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-22Sync with maintJunio C Hamano
* maint: Update draft release notes to 1.8.3.4 t9801: git-p4: check ignore files with client spec
2013-07-22Merge branch 'dk/maint-t5150-dirname' into maintJunio C Hamano
* dk/maint-t5150-dirname: tests: allow sha1's as part of the path
2013-07-22Merge branch 'jc/maint-diff-core-safecrlf' into maintJunio C Hamano
Avoid failing "git diff" when core.safecrlf is set to true, because the user cannot tell where the breakage is in preparation for fixing and committing. * jc/maint-diff-core-safecrlf: diff: demote core.safecrlf=true to core.safecrlf=warn
2013-07-21t9801: git-p4: check ignore files with client specVitor Antunes
This test confirms that a file can be ignored during git p4 sync if if is excluded in P4 client specification. Signed-off-by: Vitor Antunes <vitor.hda@gmail.com> Acked-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-20t2202: make sure "git add" (no args) stays a no-opJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-19Merge branch 'tr/test-lint-no-export-assignment-in-shell' into maintJunio C Hamano
* tr/test-lint-no-export-assignment-in-shell: test-lint: detect 'export FOO=bar' t9902: fix 'test A == B' to use = operator
2013-07-19Merge branch 'jc/t1512-fix' into maintJunio C Hamano
* jc/t1512-fix: get_short_sha1(): correctly disambiguate type-limited abbreviation t1512: correct leftover constants from earlier edition
2013-07-19Merge branch 'vl/typofix' into maintJunio C Hamano
* vl/typofix: random typofixes (committed missing a 't', successful missing an 's')
2013-07-19Merge branch 'js/test-ln-s-add' into maintJunio C Hamano
* js/test-ln-s-add: t4011: remove SYMLINKS prerequisite t6035: use test_ln_s_add to remove SYMLINKS prerequisite t3509, t4023, t4114: use test_ln_s_add to remove SYMLINKS prerequisite t3100: use test_ln_s_add to remove SYMLINKS prerequisite t3030: use test_ln_s_add to remove SYMLINKS prerequisite t0000: use test_ln_s_add to remove SYMLINKS prerequisite tests: use test_ln_s_add to remove SYMLINKS prerequisite (trivial cases) tests: introduce test_ln_s_add t3010: modernize style test-chmtime: Fix exit code on Windows
2013-07-19Merge branch 'jk/apache-test-for-2.4' into maintJunio C Hamano
Allow our tests to run with newer Apache. * jk/apache-test-for-2.4: lib-httpd/apache.conf: check version only after mod_version loads t/lib-httpd/apache.conf: configure an MPM module for apache 2.4 t/lib-httpd/apache.conf: load compat access module in apache 2.4 t/lib-httpd/apache.conf: load extra auth modules in apache 2.4 t/lib-httpd/apache.conf: do not use LockFile in apache >= 2.4
2013-07-19Merge branch 'tr/test-commit-only-on-orphan' into maintJunio C Hamano
* tr/test-commit-only-on-orphan: Test 'commit --only' after 'checkout --orphan'
2013-07-19Merge branch 'rs/tar-tests' into maintJunio C Hamano
* rs/tar-tests: t5000: test long filenames t5000: simplify tar-tree tests t5000: use check_tar for prefix test t5000: factor out check_tar t5000, t5003: create directories for extracted files lazily t5000: integrate export-subst tests into regular tests
2013-07-19Merge branch 'rs/discard-index-discard-array' into maintJunio C Hamano
* rs/discard-index-discard-array: read-cache: free cache in discard_index read-cache: add simple performance test
2013-07-18test-lib.sh - define and use GREP_STRIPS_CRMark Levedahl
Define a common macro for grep needing -U to allow tests to not need to inquire of specific platforms needing this option. Change t3032 and t5560 to use this rather than testing explicitly for mingw. This fixes these two tests on Cygwin. Signed-off-by: Mark Levedahl <mlevedahl@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-18describe: fix --contains when a tag is given as inputJunio C Hamano
"git describe" takes a commit and gives it a name based on tags in its neighbourhood. The command does take a commit-ish but when given a tag that points at a commit, it should dereference the tag before computing the name for the commit. As the whole processing is internally delegated to name-rev, if we unwrap tags down to the underlying commit when invoking name-rev, it will make the name-rev issue an error message based on the unwrapped object name (i.e. either 40-hex object name, or "$tag^0") that is different from what the end-user gave to the command when the commit cannot be described. Introduce an internal option --peel-tag to the name-rev to tell it to unwrap a tag in its input from the command line. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-18name-rev: differentiate between tags and commits they point atJunio C Hamano
"git name-rev --stdin" has been fixed to convert an object name that points at a tag to a refname of the tag. The codepath to handle its command line arguments, however, fed the commit that the tag points at to the underlying naming machinery. With this fix, you will get this: $ git name-rev --refs=tags/\* --name-only $(git rev-parse v1.8.3 v1.8.3^0) v1.8.3 v1.8.3^0 which is the same as what you would get from the fixed "--stdin" variant: $ git rev-parse v1.8.3 v1.8.3^0 | git name-rev --refs=tags/\* --name-only v1.8.3 v1.8.3^0 Signed-off-by: Junio C Hamano <gitster@pobox.com>