summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2011-02-16Merge branch 'maint-1.7.2' into maint-1.7.3Libravatar Junio C Hamano1-0/+1
* maint-1.7.2: fast-import: introduce "feature notes" command fast-import: clarify documentation of "feature" command
2011-02-16Merge branch 'maint-1.7.1' into maint-1.7.2Libravatar Junio C Hamano1-0/+1
* maint-1.7.1: fast-import: introduce "feature notes" command fast-import: clarify documentation of "feature" command
2011-02-16Merge branch 'maint-1.7.0' into maint-1.7.1Libravatar Junio C Hamano1-0/+1
* maint-1.7.0: fast-import: introduce "feature notes" command fast-import: clarify documentation of "feature" command
2011-02-09fast-import: introduce "feature notes" commandLibravatar Jonathan Nieder1-0/+1
Here is a 'feature' command for streams to use to require support for the notemodify (N) command. When the 'feature' facility was introduced (v1.7.0-rc0~95^2~4, 2009-12-04), the notes import feature was old news (v1.6.6-rc0~21^2~8, 2009-10-09) and it was not obvious it deserved to be a named feature. But now that is clear, since all major non-git fast-import backends lack support for it. Details: on git version with this patch applied, any "feature notes" command in the features/options section at the beginning of a stream will be treated as a no-op. On fast-import implementations without the feature (and older git versions), the command instead errors out with a message like This version of fast-import does not support feature notes. So by declaring use of notes at the beginning of a stream, frontends can avoid wasting time and other resources when the backend does not support notes. (This would be especially important for backends that do not support rewinding history after a botched import.) Improved-by: Thomas Rast <trast@student.ethz.ch> Improved-by: Sverre Rabbelier <srabbelier@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-27tests: sanitize more git environment variablesLibravatar Jeff King1-0/+3
These variables should generally not be set in one's environment, but they do get set by rebase, which means doing an interactive rebase like: pick abcd1234 foo exec make test will cause false negatives in the test suite. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-27Merge branch 'jn/fast-import-empty-tree-removal' into maintLibravatar Junio C Hamano1-0/+42
* jn/fast-import-empty-tree-removal: fast-import: treat filemodify with empty tree as delete
2011-01-27fast-import: treat filemodify with empty tree as deleteLibravatar Jonathan Nieder1-0/+42
Normal git processes do not allow one to build a tree with an empty subtree entry without trying hard at it. This is in keeping with the general UI philosophy: git tracks content, not empty directories. v1.7.3-rc0~75^2 (2010-06-30) changed that by making it easy to include an empty subtree in fast-import's active commit: M 040000 4b825dc642cb6eb9a060e54bf8d69288fbee4904 subdir One can trigger this by reading an empty tree (for example, the tree corresponding to an empty root commit) and trying to move it to a subtree. It is better and more closely analogous to 'git read-tree --prefix' to treat such commands as requests to remove the subtree. Noticed-by: David Barr <david.barr@cordelta.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-19Merge branch 'tr/submodule-relative-scp-url' into maintLibravatar Junio C Hamano1-0/+38
* tr/submodule-relative-scp-url: submodule: fix relative url parsing for scp-style origin
2011-01-19Merge branch 'rj/maint-test-fixes' into maintLibravatar Junio C Hamano4-23/+35
* rj/maint-test-fixes: t9501-*.sh: Fix a test failure on Cygwin lib-git-svn.sh: Add check for mis-configured web server variables lib-git-svn.sh: Avoid setting web server variables unnecessarily t9142: Move call to start_httpd into the setup test t3600-rm.sh: Don't pass a non-existent prereq to test #15
2011-01-19Merge branch 'jn/submodule-b-current' into maintLibravatar 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
2011-01-19Merge branch 'jc/maint-svn-info-test-fix' into maintLibravatar Junio C Hamano1-72/+34
* jc/maint-svn-info-test-fix: t9119: do not compare "Text Last Updated" line from "svn info"
2011-01-10submodule: fix relative url parsing for scp-style originLibravatar Thomas Rast1-0/+38
The function resolve_relative_url was not prepared to deal with an scp-style origin 'user@host:path' in the case where 'path' is only a single component. Fix this by extending the logic that strips one path component from the $remoteurl. Also add tests for both styles of URLs. Noticed-by: Jeffrey Phillips Freeman <jeffrey.freeman@syncleus.com> Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-29t9001: Fix test prerequisitesLibravatar Robin H. Johnson1-2/+2
Add in missing Perl prerequisites for new tests of send-email. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-28Merge branch 'jk/commit-die-on-bogus-ident' into maintLibravatar Junio C Hamano1-0/+4
* jk/commit-die-on-bogus-ident: commit: die before asking to edit the log message ident: die on bogus date format
2010-12-28Merge branch 'ks/blame-worktree-textconv-cached' into maintLibravatar 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-28Merge branch 'jc/maint-rebase-rewrite-last-skip' into maintLibravatar Junio C Hamano1-1/+17
* jc/maint-rebase-rewrite-last-skip: rebase --skip: correctly wrap-up when skipping the last patch
2010-12-28Merge branch 'jc/maint-am-abort-safely' into maintLibravatar Junio C Hamano1-0/+9
* jc/maint-am-abort-safely: am --abort: keep unrelated commits since the last failure and warn
2010-12-28Fix false positives in t3404 due to SHELL=/bin/falseLibravatar Robin H. Johnson1-1/+2
If the user's shell in NSS passwd is /bin/false (eg as found during Gentoo's package building), the git-rebase exec tests will fail, because they call $SHELL around the command, and in the existing testcase, $SHELL was not being cleared sufficently. This lead to false positive failures of t3404 on systems where the package build user was locked down as noted above. Signed-off-by: "Robin H. Johnson" <robbat2@gentoo.org> X-Gentoo-Bug: 349083 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=349083 Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-22test-lib.sh/test_decode_color(): use octal not hex in awk scriptLibravatar Brandon Casey1-1/+1
POSIX awk seems to explicitly not support hexadecimal escape sequences. From http://pubs.opengroup.org/onlinepubs/009695399/: Regular expressions in awk have been extended somewhat... One sequence that is not supported is hexadecimal value escapes beginning with '\x'. This affects the awk on IRIX 6.5, and causes t4015.56 to fail. Use octal instead. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-22rebase --skip: correctly wrap-up when skipping the last patchLibravatar Junio C Hamano1-1/+17
When "rebase --skip" is used to skip the last patch in the series, the code to wrap up the rewrite by copying the notes from old to new commits and also by running the post-rewrite hook was bypassed. Signed-off-by: Junio C Hamano <gitster@pobox.com>
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-21am --abort: keep unrelated commits since the last failure and warnLibravatar Junio C Hamano1-0/+9
After making commits (either by pulling or doing their own work) after a failed "am", the user will be reminded by next "am" invocation that there was a failed "am" that the user needs to decide to resolve or to get rid of the old "am" attempt. The "am --abort" option was meant to help the latter. However, it rewinded the HEAD back to the beginning of the failed "am" attempt, discarding commits made (perhaps by mistake) since. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-20ident: die on bogus date formatLibravatar Jeff King1-0/+4
If the user gives "git commit --date=foobar", we silently ignore the --date flag. We should note the error. This patch puts the fix at the lowest level of fmt_ident, which means it also handles GIT_AUTHOR_DATE=foobar, as well. There are two down-sides to this approach: 1. Technically this breaks somebody doing something like "git commit --date=now", which happened to work because bogus data is the same as "now". Though we do explicitly handle the empty string, so anybody passing an empty variable through the environment will still work. If the error is too much, perhaps it can be downgraded to a warning? 2. The error checking happens _after_ the commit message is written, which can be annoying to the user. We can put explicit checks closer to the beginning of git-commit, but that feels a little hack-ish; suddenly git-commit has to care about how fmt_ident works. Maybe we could simply call fmt_ident earlier? Signed-off-by: Jeff King <peff@peff.net> 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-14t9501-*.sh: Fix a test failure on CygwinLibravatar Ramsay Jones1-1/+1
The first (setup) test attempts to create a file, using the test_commit function, called 'i can has snapshot?'. On cygwin (and MinGW) this fails with a "No such file or directory" error. In order to fix the tests, we simply remove the '?' wildcard from the name, since the purpose of these tests is not about creating funny filenames. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-14lib-git-svn.sh: Add check for mis-configured web server variablesLibravatar Ramsay Jones1-0/+10
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-14lib-git-svn.sh: Avoid setting web server variables unnecessarilyLibravatar Ramsay Jones1-22/+25
If the SVN_HTTPD_PORT variable is not set, then we will not even attempt to start a web server in the start_httpd function (despite it's name), so there is no need to determine values for the SVN_HTTPD_PATH and SVN_HTTPD_MODULE_PATH variables. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-14t9142: Move call to start_httpd into the setup testLibravatar Ramsay Jones1-3/+2
In addition to being more consistent with the other calls to start_httpd in tests t9115-*.sh, t9118-*.sh and t9120-*.sh, this has the added benefit of making the test less noisy. (start_httpd writes "SVN_HTTPD_PORT is not defined!" on stderr.) Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-14t3600-rm.sh: Don't pass a non-existent prereq to test #15Libravatar Ramsay Jones1-1/+1
Commit c91cfd19 (tests: A SANITY test prereq for testing if we're root, 2010-08-06) introduced a SANITY prerequisite which had very similar semantics to RO_DIR. That commit removed the code to set RO_DIR, but forgot to replace RO_DIR with SANITY in test #15. In order not to skip test 15 unnecessarily, since RO_DIR will never be set, we pass the SANITY prerequisite instead. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> 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-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-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
2010-12-09Merge branch 'ab/require-perl-5.8' into maintLibravatar Junio C Hamano2-1/+2
* 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]
2010-12-06git submodule: Remove now obsolete tests before cloning a repoLibravatar Jens Lehmann1-5/+23
Since 55892d23 "git clone" itself checks that the destination path is not a file but an empty directory if it exists, so there is no need anymore for module_clone() to check that too. Two tests have been added to test the behavior of "git submodule add" when path is a file or a directory (A subshell had to be added to the former last test to stay in the right directory). Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-06t9119: do not compare "Text Last Updated" line from "svn info"Libravatar Junio C Hamano1-72/+34
On the "Text Last Updated" line, "git svn info <file>" does not give the timestamp of the commit that touched the path most recently, unlike "svn info <file>". Do not expect the output from two commands to match on these lines. There was a "ptouch" attempt to transplant the timestamp from svn working tree files to corresponding git working tree files, which mostly hid this difference, but is made pointless now with this change. Remove the helper function and calls to it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-02Merge branch 'cb/maint-orphan-merge-noclobber' into maintLibravatar Junio C Hamano1-0/+16
* cb/maint-orphan-merge-noclobber: do not overwrite untracked during merge from unborn branch