summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)Author
2010-12-22Improve error messages when temporary file creation failsArnout Engelen
Before, when creating a temporary file failed, a generic 'Unable to create temporary file' message was printed. In some cases this could lead to confusion as to which directory should be checked for correct permissions etc. This patch adds the template for the temporary filename to the error message, converting it to an absolute path if needed. A test verifies that the template is indeed printed when pointing to a nonexistent or unwritable directory. A copy of the original template is made in case mkstemp clears the template. Signed-off-by: Arnout Engelen <arnouten@bzzt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-21Merge branch 'maint'Junio C Hamano
* maint: t0050: fix printf format strings for portability t3419-*.sh: Fix arithmetic expansion syntax error
2010-12-21Merge branch 'ks/blame-worktree-textconv-cached'Junio C Hamano
* 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'Junio C Hamano
* jk/t2107-now-passes: t2107: mark passing test as success
2010-12-21Merge branch 'nd/oneline-sha1-name-from-specific-ref'Junio C Hamano
* 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 portabilityJonathan Nieder
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 errorRamsay Jones
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-20fill_textconv(): Don't get/put cache if sha1 is not validKirill Smelkov
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-20t/t8006: Demonstrate blame is broken when cachetextconv is onKirill Smelkov
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" klugeJonathan Nieder
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 successJeff King
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'Junio C Hamano
* 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'Junio C Hamano
* 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'Junio C Hamano
* 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'Junio C Hamano
* 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'Junio C Hamano
* 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'Junio C Hamano
* 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'Junio C Hamano
* jn/submodule-b-current: git submodule: Remove now obsolete tests before cloning a repo git submodule -b ... of current HEAD fails
2010-12-15get_sha1: support $commit^{/regex} syntaxNguyễn Thái Ngọc Duy
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 pathsClemens Buchacher
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 pathClemens Buchacher
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 testsClemens Buchacher
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_HEADClemens Buchacher
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 maintJunio C Hamano
* 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 maintJunio C Hamano
* jk/maint-reflog-bottom: reflogs: clear flags properly in corner case
2010-12-14Merge branch 'mz/rebase-abort-reflog-fix' into maintJunio C Hamano
* mz/rebase-abort-reflog-fix: rebase --abort: do not update branch ref
2010-12-14Merge branch 'gc/http-with-non-ascii-username-url' into maintJunio C Hamano
* 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 uniquelyMichael J Gruber
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 t9158Jeff King
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 checksJeff King
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 t7609Johannes Sixt
Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-13t9300: avoid short reads from ddJonathan Nieder
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-13Merge branch 'js/configurable-tab'Junio C Hamano
* js/configurable-tab: Make the tab width used for whitespace checks configurable apply --whitespace=fix: fix tab-in-indent
2010-12-13Merge branch 'tc/http-urls-ends-with-slash'Junio C Hamano
* 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-13Merge branch 'tc/format-patch-p'Junio C Hamano
* tc/format-patch-p: format-patch: page output with --stdout
2010-12-13Merge branch 'mz/rebase-abort-reflog-fix'Junio C Hamano
* mz/rebase-abort-reflog-fix: rebase --abort: do not update branch ref
2010-12-13Merge branch 'jk/maint-reflog-bottom'Junio C Hamano
* jk/maint-reflog-bottom: reflogs: clear flags properly in corner case
2010-12-13Merge branch 'mz/pull-rebase-rebased'Junio C Hamano
* mz/pull-rebase-rebased: Use reflog in 'pull --rebase . foo'
2010-12-13Merge branch 'jn/git-cmd-h-bypass-setup'Junio C Hamano
* 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-11Merge branch 'jk/maint-decorate-01-bool' into maintJunio C Hamano
* jk/maint-decorate-01-bool: log.decorate: accept 0/1 bool values
2010-12-11Merge branch 'mg/maint-tag-rfc1991' into maintJunio C Hamano
* 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 logicJunio C Hamano
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-09t9143: do not fail when unhandled.log.gz is not createdTorsten Bögershausen
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-09git-svn: allow the mergeinfo property to be setSteven Walter
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 maintJunio C Hamano
* jn/cherry-pick-refresh-index: cherry-pick/revert: transparently refresh index
2010-12-09Merge branch 'fc/apply-p2-get-header-name' into maintJunio C Hamano
* 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 maintJunio C Hamano
* 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 maintJunio C Hamano
* 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 maintJunio C Hamano
* tc/smart-http-post-redirect: smart-http: Don't change POST to GET when following redirect
2010-12-09Merge branch 'ab/require-perl-5.8' into maintJunio C Hamano
* ab/require-perl-5.8: perl: use "use warnings" instead of -w perl: bump the required Perl version to 5.8 from 5.6.[21]