summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2013-07-24Merge branch 'ml/avoid-using-grep-on-crlf-files'Libravatar Junio C Hamano3-2/+4
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-24Merge branch 'tr/line-log'Libravatar Junio C Hamano1-0/+13
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-24t4211: fix incorrect rebase at f8395edc (range-set: satisfy non-empty ranges ↵Libravatar Junio C Hamano1-1/+0
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 fileLibravatar Eric Sunshine1-1/+1
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 invariantLibravatar Eric Sunshine1-1/+2
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 rangeLibravatar Eric Sunshine1-0/+5
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 crashLibravatar Eric Sunshine1-0/+8
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'Libravatar Junio C Hamano1-1/+1
* mv/merge-ff-tristate: t7600: fix typo in test title
2013-07-23t7600: fix typo in test titleLibravatar Junio C Hamano1-1/+1
Spotted by Ram, confirmed by Miklos. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-22Sync with Git 1.8.3.4Libravatar Junio C Hamano1-1/+1
2013-07-22Merge branch 'jc/name-rev-exact-ref'Libravatar Junio C Hamano1-0/+24
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'Libravatar Junio C Hamano1-0/+43
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'Libravatar Junio C Hamano2-18/+493
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'Libravatar Junio C Hamano1-0/+70
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'Libravatar Junio C Hamano1-2/+10
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'Libravatar Junio C Hamano1-0/+167
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'Libravatar Junio C Hamano3-112/+269
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'Libravatar Junio C Hamano1-9/+39
"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'Libravatar Junio C Hamano1-0/+18
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'Libravatar Junio C Hamano1-0/+10
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 archiveLibravatar Ondřej Bílka1-1/+1
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-21Sync with maintLibravatar Junio C Hamano1-3/+20
* maint: Update draft release notes to 1.8.3.4 t9801: git-p4: check ignore files with client spec
2013-07-21Merge branch 'dk/maint-t5150-dirname' into maintLibravatar Junio C Hamano1-1/+1
* dk/maint-t5150-dirname: tests: allow sha1's as part of the path
2013-07-21Merge branch 'jc/maint-diff-core-safecrlf' into maintLibravatar Junio C Hamano1-0/+8
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 specLibravatar Vitor Antunes1-3/+20
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-19t2202: make sure "git add" (no args) stays a no-opLibravatar Junio C Hamano1-0/+10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-19Merge branch 'tr/test-lint-no-export-assignment-in-shell' into maintLibravatar Junio C Hamano2-1/+2
* 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 maintLibravatar Junio C Hamano1-10/+22
* 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 maintLibravatar Junio C Hamano1-1/+1
* vl/typofix: random typofixes (committed missing a 't', successful missing an 's')
2013-07-19Merge branch 'js/test-ln-s-add' into maintLibravatar Junio C Hamano29-329/+347
* 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 maintLibravatar Junio C Hamano1-1/+19
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 maintLibravatar Junio C Hamano1-0/+13
* tr/test-commit-only-on-orphan: Test 'commit --only' after 'checkout --orphan'
2013-07-19Merge branch 'rs/tar-tests' into maintLibravatar Junio C Hamano3-78/+92
* 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 maintLibravatar Junio C Hamano1-0/+14
* 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_CRLibravatar Mark Levedahl3-2/+4
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 inputLibravatar Junio C Hamano1-0/+12
"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 atLibravatar Junio C Hamano1-0/+12
"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>
2013-07-18Merge branch 'jk/in-pack-size-measurement'Libravatar Junio C Hamano1-43/+31
"git cat-file --batch-check=<format>" is added, primarily to allow on-disk footprint of objects in packfiles (often they are a lot smaller than their true size, when expressed as deltas) to be reported. * jk/in-pack-size-measurement: pack-revindex: radix-sort the revindex pack-revindex: use unsigned to store number of objects cat-file: split --batch input lines on whitespace cat-file: add %(objectsize:disk) format atom cat-file: add --batch-check=<format> cat-file: refactor --batch option parsing cat-file: teach --batch to stream blob objects t1006: modernize output comparisons teach sha1_object_info_extended a "disk_size" query zero-initialize object_info structs
2013-07-18Merge branch 'bp/mediawiki-preview'Libravatar Junio C Hamano1-0/+1
Add a command to allow previewing the contents locally before pushing it out, when working with a MediaWiki remote. I personally do not think this belongs to Git. If you are working on a set of AsciiDoc source files, you sure do want to locally format to preview what you will be pushing out, and if you are working on a set of C or Java source files, you do want to test it before pushing it out, too. That kind of thing belongs to your build script, not to your SCM. But I'll let it pass, as this is only a contrib/ thing. * bp/mediawiki-preview: git-remote-mediawiki: add preview subcommand into git mw git-remote-mediawiki: add git-mw command git-remote-mediawiki: factoring code between git-remote-mediawiki and Git::Mediawiki git-remote-mediawiki: update tests to run with the new bin-wrapper git-remote-mediawiki: add a git bin-wrapper for developement wrap-for-bin: make bin-wrappers chainable git-remote-mediawiki: introduction of Git::Mediawiki.pm
2013-07-18Merge branch 'bc/commit-invalid-utf8'Libravatar Junio C Hamano1-0/+36
Logic to auto-detect character encodings in the commit log message did not reject overlong and invalid UTF-8 characters. * bc/commit-invalid-utf8: commit: reject non-characters commit: reject overlong UTF-8 sequences commit: reject invalid UTF-8 codepoints
2013-07-18Merge branch 'es/overlapping-range-set'Libravatar Junio C Hamano1-3/+131
* es/overlapping-range-set: range_set: fix coalescing bug when range is a subset of another t4211: fix broken test when one -L range is subset of another
2013-07-18Merge branch 'jk/maint-clone-shared-no-connectivity-validation'Libravatar Junio C Hamano1-1/+7
"git clone -s/-l" is a filesystem level copy and does not offer any protection against source repository being corrupt. While the connectivity validation checks commits and trees being readable, it made the otherwise instantaneous local modes of clone much more expensive, without protecting blob data from bitflips. * jk/maint-clone-shared-no-connectivity-validation: clone: drop connectivity check for local clones
2013-07-18Merge branch 'rr/rebase-reflog-message-reword'Libravatar Junio C Hamano1-0/+15
"git rebase [-i]" used to leave just "rebase" as its reflog message for some operations. This rewords them to be more informative. * rr/rebase-reflog-message-reword: rebase -i: use a better reflog message rebase: use a better reflog message
2013-07-17t8001/t8002 (blame): add blame -L :funcname testsLibravatar Eric Sunshine1-2/+46
git-blame inherited "-L :funcname" support when "-L :funcname:file" was implemented for git-log. Add tests. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17t8001/t8002 (blame): add blame -L testsLibravatar Eric Sunshine1-3/+101
With the exception of a couple "corner case" checks in t8003 (and some indirect tests in t4211 of -L parsing code shared by log -L), there is no systematic checking of blame -L. Add tests to check blame -L directly. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17t8001/t8002 (blame): modernize styleLibravatar Eric Sunshine3-112/+127
In particular, - indent with tabs - cuddle test description and opening body quote with test_expect_foo - normalize test descriptions and case - remove whitepsace following redirection operator - use standardized filenames (such as "actual", "expected") Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17show-ref: make --head always show the HEAD refLibravatar Doug Bell1-0/+167
The docs seem to say that doing git show-ref --head --tags would show both the HEAD ref and all the tag refs. However, doing both --head and either of --tags or --heads would filter out the HEAD ref. Also update the documentation to describe the new behavior and add tests for the show-ref command. [jc: Doug did proofread the tests, but it was done by me and bugs in it are mine]. Signed-off-by: Doug Bell <madcityzen@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17diff: allow --patch & cie to override -s/--no-patchLibravatar Matthieu Moy1-0/+18
All options that trigger a patch output now override --no-patch. The case of --binary deserves extra attention: the name may suggest that it turns a normal patch into a binary patch, but it actually already enables patch output when normally disabled (e.g. "git log --binary" displays a patch), hence it makes sense for "git show --no-patch --binary" to display the binary patch. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17diff: allow --no-patch as synonym for -sLibravatar Matthieu Moy1-0/+12
This follows the usual convention of having a --no-foo option to negate --foo. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17t4000-diff-format.sh: modernize styleLibravatar Matthieu Moy1-9/+9
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>