summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2010-12-22t0021: avoid getting filter killed with SIGPIPELibravatar Junio C Hamano1-0/+1
The fake filter did not read from the standard input at all, which caused the calling side to die with SIGPIPE, depending on the timing. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-22convert filter: supply path to external driverLibravatar Pete Wyckoff1-0/+42
Filtering to support keyword expansion may need the name of the file being filtered. In particular, to support p4 keywords like $File: //depot/product/dir/script.sh $ the smudge filter needs to know the name of the file it is smudging. Allow "%f" in the custom filter command line specified in the configuration. This will be substituted by the filename inside a single-quote pair to be passed to the shell. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-21Merge branch 'maint'Libravatar Junio C Hamano2-4/+4
* maint: t0050: fix printf format strings for portability t3419-*.sh: Fix arithmetic expansion syntax error
2010-12-21Merge branch 'ks/blame-worktree-textconv-cached'Libravatar Junio C Hamano1-0/+21
* ks/blame-worktree-textconv-cached: fill_textconv(): Don't get/put cache if sha1 is not valid t/t8006: Demonstrate blame is broken when cachetextconv is on
2010-12-21Merge branch 'jk/t2107-now-passes'Libravatar Junio C Hamano1-1/+1
* jk/t2107-now-passes: t2107: mark passing test as success
2010-12-21Merge branch 'nd/oneline-sha1-name-from-specific-ref'Libravatar Junio C Hamano1-0/+73
* nd/oneline-sha1-name-from-specific-ref: get_sha1: handle special case $commit^{/} get_sha1: support $commit^{/regex} syntax get_sha1_oneline: make callers prepare the commit list to traverse get_sha1_oneline: fix lifespan rule of temp_commit_buffer variable
2010-12-21t0050: fix printf format strings for portabilityLibravatar Jonathan Nieder1-2/+2
Unlike bash and ksh, dash passes through hexadecimal \xcc escapes. So when run with dash, these tests *pass* (since '\xcc' is a perfectly reasonable filename) but they are not testing what was intended. Use octal escapes instead, in the spirit of v1.6.1-rc1~55^2 (2008-11-09). Reported-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-21t3419-*.sh: Fix arithmetic expansion syntax errorLibravatar Ramsay Jones1-2/+2
Some shells, for example dash versions older than 0.5.4, need to spell a variable reference as '$N' rather than 'N' in an arithmetic expansion. In order to avoid the syntax error, we change the offending variable reference from 'i' to '$i' in function scramble. There is nothing bash specific to this test script (and we shouldn't have any bash dependent test). Fix its shebang line. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-19fill_textconv(): Don't get/put cache if sha1 is not validLibravatar Kirill Smelkov1-2/+1
When blaming files in the working tree, the filespec is marked with !sha1_valid, as we have not given the contents an object name yet. The function to cache textconv results (keyed on the object name), however, didn't check this condition, and ended up on storing the cached result under a random object name. Cc: Axel Bonnet <axel.bonnet@ensimag.imag.fr> Cc: Clément Poulain <clement.poulain@ensimag.imag.fr> Cc: Diane Gasselin <diane.gasselin@ensimag.imag.fr> Cc: Jeff King <peff@peff.net> Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-19t/t8006: Demonstrate blame is broken when cachetextconv is onLibravatar Kirill Smelkov1-0/+22
I have a git repository with lots of .doc and .pdf files. There diff works ok, but blaming is painfully slow without textconv cache, and with textconv cache, blame says lots of lines are 'Not Yet Committed' which is wrong. Here is a test that demonstrates the problem. Cc: Axel Bonnet <axel.bonnet@ensimag.imag.fr> Cc: Clément Poulain <clement.poulain@ensimag.imag.fr> Cc: Diane Gasselin <diane.gasselin@ensimag.imag.fr> Cc: Jeff King <peff@peff.net> Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-19t9300: use perl "head -c" clone in place of "dd bs=1 count=16000" klugeLibravatar Jonathan Nieder1-35/+49
It is unfortunate to have to issue thousands of one-byte read calls to work around dd's refusal to buffer input that would fill a block after a short read (a3a6f4, 2010-12-13). We could do better by using "head -c", if it were available on all platforms we cared about. Replace it with some simple perl. While doing so, restructure 9300.114 to use a subshell instead of a script. Subshells can inherit functions (like the new head_c) from the parent shell while external scripts cannot. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-19t2107: mark passing test as successLibravatar Jeff King1-1/+1
This failed on the branch where it was introduced, but was fixed by merging with 6e67619 (Merge branch 'jn/parse-options-extra'). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-16Merge branch 'jn/fast-import-blob-access'Libravatar Junio C Hamano1-2/+265
* jn/fast-import-blob-access: t9300: avoid short reads from dd t9300: remove unnecessary use of /dev/stdin fast-import: Allow cat-blob requests at arbitrary points in stream fast-import: let importers retrieve blobs fast-import: clarify documentation of "feature" command fast-import: stricter parsing of integer options Conflicts: fast-import.c
2010-12-16Merge branch 'jl/fetch-submodule-recursive'Libravatar Junio C Hamano1-0/+195
* jl/fetch-submodule-recursive: fetch_populated_submodules(): document dynamic allocation Submodules: Add the "fetchRecurseSubmodules" config option Add the 'fetch.recurseSubmodules' config setting fetch/pull: Add the --recurse-submodules option Conflicts: builtin/fetch.c
2010-12-16Merge branch 'nd/extended-sha1-relpath'Libravatar Junio C Hamano1-0/+86
* nd/extended-sha1-relpath: get_sha1: teach ":$n:<path>" the same relative path logic get_sha1: support relative path ":path" syntax Make prefix_path() return char* without const Conflicts: sha1_name.c
2010-12-16Merge branch 'aa/status-hilite-branch'Libravatar Junio C Hamano1-2/+3
* aa/status-hilite-branch: default color.status.branch to "same as header" status: show branchname with a configurable color
2010-12-16Merge branch 'jn/maint-svn-fe'Libravatar Junio C Hamano1-2/+18
* jn/maint-svn-fe: t9010 fails when no svn is available vcs-svn: fix intermittent repo_tree corruption treap: make treap_insert return inserted node t9010 (svn-fe): Eliminate dependency on svn perl bindings
2010-12-16Merge branch 'jc/maint-svn-info-test-fix'Libravatar Junio C Hamano1-72/+34
* jc/maint-svn-info-test-fix: t9119: do not compare "Text Last Updated" line from "svn info"
2010-12-16Merge branch 'jn/submodule-b-current'Libravatar Junio C Hamano1-5/+23
* jn/submodule-b-current: git submodule: Remove now obsolete tests before cloning a repo git submodule -b ... of current HEAD fails
2010-12-14get_sha1: support $commit^{/regex} syntaxLibravatar Nguyễn Thái Ngọc Duy1-0/+73
This works like ":/regex" syntax that finds a recently created commit starting from all refs, but limits the discovery to those reachable from the named commit. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-14use persistent memory for rejected pathsLibravatar Clemens Buchacher2-11/+24
An aborted merge prints the list of rejected paths as part of the error message. Since commit f66caaf9 (do not overwrite files in leading path), some of those paths do not have static buffers, so we have to keep a copy. Use string_list's to accomplish this. This changes the order of the list to the order in which the paths are processed. Previously, it was reversed. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-14do not overwrite files in leading pathLibravatar Clemens Buchacher1-1/+1
If the work tree contains an untracked file x, and unpack-trees wants to checkout a path x/*, the file x is removed unconditionally. Instead, apply the same checks that are normally used for untracked files, and abort if the file cannot be removed. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-14t7607: add leading-path testsLibravatar Clemens Buchacher1-0/+51
Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-14t7607: use test-lib functions and check MERGE_HEADLibravatar Clemens Buchacher1-23/+15
Use the test_commit and test_path_is_missing functions from the test library. Also make sure that a merge which fails due to pre-merge checks aborts properly and does not leave MERGE_HEAD behind. The "will not overwrite removed file" test is an exception to this. It notices the untracked file at a stage where the merge is already well under way. Therefore we cannot abort the merge without major restructuring. See the following thread for more details. http://mid.gmane.org/7vskopwxej.fsf@gitster.siamese.dyndns.org Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-14Merge branch 'tc/http-urls-ends-with-slash' into maintLibravatar Junio C Hamano1-2/+14
* tc/http-urls-ends-with-slash: http-fetch: rework url handling http-push: add trailing slash at arg-parse time, instead of later on http-push: check path length before using it http-push: Normalise directory names when pushing to some WebDAV servers http-backend: use end_url_with_slash() url: add str wrapper for end_url_with_slash() shift end_url_with_slash() from http.[ch] to url.[ch] t5550-http-fetch: add test for http-fetch t5550-http-fetch: add missing '&&'
2010-12-14Merge branch 'jk/maint-reflog-bottom' into maintLibravatar Junio C Hamano1-0/+34
* jk/maint-reflog-bottom: reflogs: clear flags properly in corner case
2010-12-14Merge branch 'mz/rebase-abort-reflog-fix' into maintLibravatar Junio C Hamano1-0/+12
* mz/rebase-abort-reflog-fix: rebase --abort: do not update branch ref
2010-12-14Merge branch 'gc/http-with-non-ascii-username-url' into maintLibravatar Junio C Hamano4-0/+40
* gc/http-with-non-ascii-username-url: Fix username and password extraction from HTTP URLs t5550: test HTTP authentication and userinfo decoding Conflicts: t/lib-httpd/apache.conf
2010-12-13t800?-blame.sh: retitle uniquelyLibravatar Michael J Gruber2-0/+0
Currently we have three test files matching t800?-blame.sh. Rename the latter two to make it easier to spot where additions would go. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-13tests: flip executable bit on t9158Libravatar Jeff King1-0/+0
All tests are supposed to be executable. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-13tests: add some script lint checksLibravatar Jeff King1-2/+14
There are some common but minor errors we tend to make in writing test scripts: 1. Scripts are left non-executable. This is not usually noticed immediately because "make test" does not need the bit, but it is a matter of git policy to make them executable (and is a slight convenience when running individual scripts). 2. Two scripts are allocated the same number. Usually this happens on separate branches, and the problem only comes about during a merge. But since there is no textual conflict, the merger would have to be very observant to notice. This is also a minor error, but can make GIT_SKIP_TESTS ambiguous. This patch introduces a "test-lint" target which checks both. It is not invoked by default. You can invoke it as "make test-lint", or you can make it a prerequisite of running the tests by specifying "TEST_LINT = test-lint" in your config.mak or on the command line. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-13Avoid duplicate test number t7609Libravatar Johannes Sixt1-0/+0
Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-12t9300: avoid short reads from ddLibravatar Jonathan Nieder1-3/+3
dd is a thin wrapper around read(2). As open group Issue 7 explains: It shall read the input one block at a time, using the specified input block size; it shall then process the block of data actually returned, which could be smaller than the requested block size. Any short read --- for example from a pipe whose capacity cannot fill a block --- results in that block being truncated. As a result, the first cat-blob test (9300.114) fails on Mac OS X, where the pipe capacity is around 8 KiB. Fix the test by using a block size of 1. Each read will block until the next byte of input is available. It would be even nicer to use head -c which expresses the intention more clearly. Alas, IRIX "head" does not support the -c option. Reported-by: Brian Gernhardt <brian@gernhardtsoftware.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-12Merge branch 'js/configurable-tab'Libravatar Junio C Hamano3-4/+156
* js/configurable-tab: Make the tab width used for whitespace checks configurable apply --whitespace=fix: fix tab-in-indent
2010-12-12Merge branch 'tc/http-urls-ends-with-slash'Libravatar Junio C Hamano1-2/+14
* tc/http-urls-ends-with-slash: http-fetch: rework url handling http-push: add trailing slash at arg-parse time, instead of later on http-push: check path length before using it http-push: Normalise directory names when pushing to some WebDAV servers http-backend: use end_url_with_slash() url: add str wrapper for end_url_with_slash() shift end_url_with_slash() from http.[ch] to url.[ch] t5550-http-fetch: add test for http-fetch t5550-http-fetch: add missing '&&'
2010-12-12Merge branch 'tc/format-patch-p'Libravatar Junio C Hamano1-0/+23
* tc/format-patch-p: format-patch: page output with --stdout
2010-12-12Merge branch 'mz/rebase-abort-reflog-fix'Libravatar Junio C Hamano1-0/+12
* mz/rebase-abort-reflog-fix: rebase --abort: do not update branch ref
2010-12-12Merge branch 'jk/maint-reflog-bottom'Libravatar Junio C Hamano1-0/+34
* jk/maint-reflog-bottom: reflogs: clear flags properly in corner case
2010-12-12Merge branch 'mz/pull-rebase-rebased'Libravatar Junio C Hamano1-0/+7
* mz/pull-rebase-rebased: Use reflog in 'pull --rebase . foo'
2010-12-12Merge branch 'jn/git-cmd-h-bypass-setup'Libravatar Junio C Hamano7-0/+169
* jn/git-cmd-h-bypass-setup: update-index -h: show usage even with corrupt index merge -h: show usage even with corrupt index ls-files -h: show usage even with corrupt index gc -h: show usage even with broken configuration commit/status -h: show usage even with broken configuration checkout-index -h: show usage even in an invalid repository branch -h: show usage even in an invalid repository Conflicts: builtin/merge.c
2010-12-10Merge branch 'jk/maint-decorate-01-bool' into maintLibravatar Junio C Hamano1-0/+9
* jk/maint-decorate-01-bool: log.decorate: accept 0/1 bool values
2010-12-10Merge branch 'mg/maint-tag-rfc1991' into maintLibravatar Junio C Hamano1-0/+66
* mg/maint-tag-rfc1991: tag: recognize rfc1991 signatures tag: factor out sig detection for tag display tag: factor out sig detection for body edits verify-tag: factor out signature detection t/t7004-tag: test handling of rfc1991 signatures
2010-12-09get_sha1: teach ":$n:<path>" the same relative path logicLibravatar Junio C Hamano1-0/+24
We taught the object name parser to take ":./<path>", ":../<path>", etc. and understand them to be relative to the current working directory. Given that ":<path>" is just a short-hand for ":0:<path>" (i.e. "take stage #0 of that path"), we should allow ":$n:<path>" to interpret them the same way. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-10t9143: do not fail when unhandled.log.gz is not createdLibravatar Torsten Bögershausen1-3/+1
Do not depend on internal implementation details of svn, which right now uses perl to create a .gz file. So this test case will even work in the future, when svn changes its implementation. Signed-off-by: Torsten Bögershausen <tboegi@web.de> Acked-by: Eric Wong <normalperson@yhbt.net>
2010-12-10git-svn: allow the mergeinfo property to be setLibravatar Steven Walter1-0/+41
As a first step towards preserving merges across dcommit, we need a mechanism to update the svn:mergeinfo property. [ew: fixed bashism and style issues in test case] Signed-off-by: Steven Walter <stevenrwalter@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2010-12-09Merge branch 'jn/cherry-pick-refresh-index' into maintLibravatar Junio C Hamano1-0/+10
* jn/cherry-pick-refresh-index: cherry-pick/revert: transparently refresh index
2010-12-09Merge branch 'fc/apply-p2-get-header-name' into maintLibravatar Junio C Hamano1-0/+26
* fc/apply-p2-get-header-name: test: git-apply -p2 rename/chmod only Fix git-apply with -p greater than 1
2010-12-09Merge branch 'ak/apply-non-git-epoch' into maintLibravatar Junio C Hamano4-0/+28
* ak/apply-non-git-epoch: apply: handle patches with funny filename and colon in timezone apply: Recognize epoch timestamps with : in the timezone
2010-12-09Merge branch 'cm/diff-check-at-eol' into maintLibravatar Junio C Hamano1-0/+9
* cm/diff-check-at-eol: diff --check: correct line numbers of new blank lines at EOF
2010-12-09Merge branch 'tc/smart-http-post-redirect' into maintLibravatar Junio C Hamano2-0/+15
* tc/smart-http-post-redirect: smart-http: Don't change POST to GET when following redirect