summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2009-04-05tests: remove exit after test_done callLibravatar Jeff King17-26/+0
test_done always exits, so this line is never executed. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-04send-email: fix nasty bug in ask() functionLibravatar Jay Soffian1-0/+13
Commit 6e18251 (send-email: refactor and ensure prompting doesn't loop forever) introduced an ask function, which unfortunately had a nasty bug. This caused it not to accept anything but the default reply to the "Who should the emails appear to be from?" prompt, and nothing but ctrl-d to the "Who should the emails be sent to?" and "Message-ID to be used as In-Reply-To for the first email?" prompts. This commit corrects the issues and adds a test to confirm the fix. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-02send-email: ensure quoted addresses are rfc2047 encodedLibravatar Jay Soffian1-0/+13
sanitize_address assumes that quoted addresses (e.g., "first last" <first.last@example.com) do not need rfc2047 encoding, but this is not always the case. For example, various places in send-email extract addresses using parse_address_line. parse_address_line returns the addresses already quoted (e.g., "first last" <first.last@example.com), but not rfc2047 encoded. This patch makes sanitize_address stricter about what needs rfc2047 encoding and adds a test demonstrating where I noticed the problem. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-02send-email: correct two tests which were going interactiveLibravatar Jay Soffian1-3/+5
Commit c18f75a (send-email: add tests for refactored prompting, 2009-03-28) added two tests which went interactive under the dash shell. This patch corrects the issue, reported by Björn Steinbrink. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-01Merge branch 'ef/fast-export'Libravatar Junio C Hamano1-0/+15
* ef/fast-export: builtin-fast-export.c: handle nested tags builtin-fast-export.c: fix crash on tagged trees builtin-fast-export.c: turn error into warning test-suite: adding a test for fast-export with tag variants
2009-04-01Merge branch 'mh/format-patch-add-header'Libravatar Junio C Hamano1-0/+15
* mh/format-patch-add-header: format-patch: add arbitrary email headers
2009-04-01Merge branch 'jc/maint-1.6.0-keep-pack'Libravatar Junio C Hamano1-0/+61
* jc/maint-1.6.0-keep-pack: pack-objects: don't loosen objects available in alternate or kept packs t7700: demonstrate repack flaw which may loosen objects unnecessarily Remove --kept-pack-only option and associated infrastructure pack-objects: only repack or loosen objects residing in "local" packs git-repack.sh: don't use --kept-pack-only option to pack-objects t7700-repack: add two new tests demonstrating repacking flaws Conflicts: t/t7700-repack.sh
2009-04-01send-email: ask_default should apply to all emails, not just the firstLibravatar Jay Soffian1-1/+3
Commit 6e18251 made the "Send this email?" prompt assume yes if confirm = "inform" when it was unable to get a valid response. However, the "yes" assumption only worked correctly for the first email. This commit fixes the issue and confirms the fix by modifying the existing test for the prompt to send multiple emails. Reported by Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-29send-email: add tests for refactored promptingLibravatar Jay Soffian1-4/+48
Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-29builtin-fast-export.c: handle nested tagsLibravatar Erik Faye-Lund1-2/+2
When tags that points to tags are passed to fast-export, an error is given, saying "Tag [TAGNAME] points nowhere?". This fix calls parse_object() on the object before referencing it's tag, to ensure the tag-info is fully initialized. In addition, it inserts a comment to point out where nested tags are handled. This is consistent with the comment for signed tags. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-29builtin-fast-export.c: fix crash on tagged treesLibravatar Erik Faye-Lund1-3/+2
If a tag object points to a tree (or another unhandled type), the commit- pointer is left uninitialized and later dereferenced. This patch adds a default case to the switch that issues a warning and skips the object. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-29test-suite: adding a test for fast-export with tag variantsLibravatar Erik Faye-Lund1-0/+16
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-28Merge branch 'maint'Libravatar Junio C Hamano2-9/+1
* maint: test-lib: Clean up comments and Makefile. diff --no-index: Do not generate patch output if other output is requested
2009-03-28Merge branch 'jc/maint-1.6.0-diff-borrow-carefully'Libravatar Junio C Hamano1-0/+8
* jc/maint-1.6.0-diff-borrow-carefully: diff --cached: do not borrow from a work tree when a path is marked as assume-unchanged
2009-03-28Merge branch 'maint-1.6.1' into maintLibravatar Junio C Hamano2-9/+1
* maint-1.6.1: test-lib: Clean up comments and Makefile. diff --no-index: Do not generate patch output if other output is requested
2009-03-28test-lib: Clean up comments and Makefile.Libravatar Emil Sit2-9/+1
Bring documentation in test-lib and clean target in Makefile in-line with abc5d372. Signed-off-by: Emil Sit <sit@emilsit.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-27format-patch: add arbitrary email headersLibravatar Michael Hendricks1-0/+15
format-patch supports the format.headers configuration for adding arbitrary email headers to the patches it outputs. This patch adds support for an --add-header argument which makes the same feature available from the command line. This is useful when the content of custom email headers must change from branch to branch. This patch has been sponsored by Grant Street Group Signed-off-by: Michael Hendricks <michael@ndrix.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-26Merge branch 'jk/reflog-date'Libravatar Junio C Hamano1-0/+67
* jk/reflog-date: make oneline reflog dates more consistent with multiline format
2009-03-26Merge branch 'jc/attributes-checkout'Libravatar Junio C Hamano1-0/+31
* jc/attributes-checkout: Add a test for checking whether gitattributes is honored by checkout. Read attributes from the index that is being checked out
2009-03-26Merge branch 'js/maint-diff-temp-smudge'Libravatar Junio C Hamano1-0/+16
* js/maint-diff-temp-smudge: Smudge the files fed to external diff and textconv
2009-03-26Merge branch 'bc/maint-1.6.1-branch-deleted-was'Libravatar Junio C Hamano1-1/+1
* bc/maint-1.6.1-branch-deleted-was: git-branch: display "was sha1" on branch deletion rather than just "sha1" Conflicts: builtin-branch.c
2009-03-25fast-export: Avoid dropping files from commitsLibravatar Elijah Newren1-2/+5
When exporting a subset of commits on a branch that do not go back to a root commit (e.g. master~2..master), we still want each exported commit to have the same files in the exported tree as in the original tree. Previously, when given such a range, we would omit master~2 as a parent of master~1, but we would still diff against master~2 when selecting the list of files to include in master~1. This would result in only files that had changed in the given range showing up in the resulting export. In such cases, we should diff master~1 against the root instead (i.e. use diff_root_tree_sha1 instead of diff_tree_sha1). There's a special case to consider here: incremental exports (i.e. exports where the --import-marks flag is specified). If master~2 is an imported mark, then we still want to diff master~1 against master~2 when selecting the list of files to include. We can handle all cases, including the special case, by just checking whether master~2 corresponds to a known object mark when deciding what to diff against. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-25Merge branch 'for-junio' of git://repo.or.cz/git/mingw/j6tLibravatar Junio C Hamano3-1/+4
* 'for-junio' of git://repo.or.cz/git/mingw/j6t: t7502-commit: Skip SIGTERM test on Windows t7005-editor: Use $SHELL_PATH in the editor scripts
2009-03-25t7502-commit: Skip SIGTERM test on WindowsLibravatar Johannes Sixt2-1/+3
The implementation of exec on Windows is just a rough approximation of the POSIX behavior. In particular, no real process "overlay" happens (a new process is spawned instead and the parent process waits until the child terminates). In particular, the process ID cannot be taken by the exec'd process. But there is one test in t7502-commit.sh that depends on this. We have to skip it on Windows. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2009-03-25t7005-editor: Use $SHELL_PATH in the editor scriptsLibravatar Johannes Sixt1-0/+1
The test sets up various shell scripts and uses them as commit message editors. On Windows, we need a shebang line in order to recognize the files as executable shell scripts. This adds it. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2009-03-24Merge branch 'js/windows-tests'Libravatar Junio C Hamano52-288/+594
* js/windows-tests: t0060: fix whitespace in "wc -c" invocation t5503: GIT_DEBUG_SEND_PACK is not supported on MinGW t7004: Use prerequisite tags to skip tests that need gpg Use prerequisites to skip tests that need unzip t3700: Skip a test with backslashes in pathspec Skip tests that require a filesystem that obeys POSIX permissions t0060: Fix tests on Windows Use prerequisite tags to skip tests that depend on symbolic links t9100, t9129: Use prerequisite tags for UTF-8 tests t5302: Use prerequisite tags to skip 64-bit offset tests Skip tests that fail if the executable bit is not handled by the filesystem t3600: Use test prerequisite tags test-lib: Infrastructure to test and check for prerequisites t0050: Check whether git init detected symbolic link support correctly Tests on Windows: $(pwd) must return Windows-style paths test-lib: Work around missing sum on Windows test-lib: Work around incompatible sort and find on Windows Conflicts: t/t3000-ls-files-others.sh
2009-03-23t0060: fix whitespace in "wc -c" invocationLibravatar Jeff King1-1/+1
Some platforms like to stick extra whitespace in the output of "wc -c"; using the result without quotes gets the shell to collapse the whitespace. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-22diff --cached: do not borrow from a work tree when a path is marked as ↵Libravatar Junio C Hamano1-0/+8
assume-unchanged When the index says that the file in the work tree that corresponds to the blob object that is used for comparison is known to be unchanged, "diff" reads from the file and applies convert_to_git(), instead of inflating the object, to feed the internal diff engine with, because an earlier benchnark found that it tends to be faster to use this optimization. However, the index can lie when the path is marked as assume-unchanged. Disable the optimization for such paths. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-22Smudge the files fed to external diff and textconvLibravatar Johannes Schindelin1-0/+16
When preparing temporary files for an external diff or textconv, it is easier on the external tools, especially when they are implemented using platform tools, if they are fed the input after convert_to_working_tree(). This fixes msysGit issue 177. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-22t5503: GIT_DEBUG_SEND_PACK is not supported on MinGWLibravatar Johannes Sixt1-0/+7
The test opens fd 3 and instructs git-upload-pack (via GIT_DEBUG_SEND_PACK) to log information to that channel. The way in which new processes are spawned by git on MinGW does not inherit all file descriptors to the child processes, but only 0, 1, and 2. The tests in t5503 require that file descriptor 3 is inherited from git-fetch to git-upload-pack. A complete implementation is non-trivial and not warranted just to satisfy this test. Note that the incompleteness applies only to the executables that use compat/mingw.c; bash and perl (the other important executables used by git) are complete, of course. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2009-03-22t7004: Use prerequisite tags to skip tests that need gpgLibravatar Johannes Sixt1-49/+48
The tests are skipped if no gpg was found or if gpg is version 1.0.6. Previously, the latter condition was checked a bit later in the test file so that the tag verification tests would be exercised. These are now skipped as well, but only because we would need a facility to revoke a test prerequisite, which we do not have. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2009-03-22Use prerequisites to skip tests that need unzipLibravatar Johannes Sixt2-11/+11
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2009-03-22t3700: Skip a test with backslashes in pathspecLibravatar Johannes Sixt2-1/+3
The test verifies that glob special characters can be escaped with backslashes. In particular, the string fo\[ou\]bar is given to git. On Windows, this does not work because backslashes are first of all directory separators, and first thing git does with a pathspec from the command line is to convert backslashes to forward slashes. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2009-03-22Skip tests that require a filesystem that obeys POSIX permissionsLibravatar Johannes Sixt6-19/+23
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2009-03-22t0060: Fix tests on WindowsLibravatar Johannes Sixt1-33/+83
Since the MSYS bash mangles absolute paths that it passes as command line arguments to non-MSYS progams (such as git or test-path-utils), we have to bend over backwards to squeeze some usefulness out of the existing tests. In particular, a set of path normalization tests is added that test relative paths. Some paths in the ancestor path tests are adjusted to help MSYS bash's path mangling heuristics. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2009-03-22Use prerequisite tags to skip tests that depend on symbolic linksLibravatar Johannes Sixt32-76/+211
Many tests depend on that symbolic links work. This introduces a check that sets the prerequisite tag SYMLINKS if the file system supports symbolic links. Since so many tests have to check for this prerequisite, we do the check in test-lib.sh, so that we don't need to repeat the test in many scripts. To check for 'ln -s' failures, you can use a FAT partition on Linux: $ mkdosfs -C git-on-fat 1000000 $ sudo mount -o loop,uid=j6t,gid=users,shortname=winnt git-on-fat /mnt Clone git to /mnt and $ GIT_SKIP_TESTS='t0001.1[34] t0010 t1301 t403[34] t4129.[47] t5701.7 t7701.3 t9100 t9101.26 t9119 t9124.[67] t9200.10 t9600.6' \ make test (These additionally skipped tests depend on POSIX permissions that FAT on Linux does not provide.) Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2009-03-22t9100, t9129: Use prerequisite tags for UTF-8 testsLibravatar Johannes Sixt2-31/+28
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2009-03-22t5302: Use prerequisite tags to skip 64-bit offset testsLibravatar Johannes Sixt1-10/+5
The effects of this patch can be tested on Linux by commenting out #define _FILE_OFFSET_BITS 64 in git-compat-util.h. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2009-03-22Skip tests that fail if the executable bit is not handled by the filesystemLibravatar Johannes Sixt5-20/+42
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2009-03-22t3600: Use test prerequisite tagsLibravatar Johannes Sixt1-28/+30
There are two prerequisites: - The filesystem supports names with tabs or new-lines. - Files cannot be removed if their containing directory is read-only. Previously, whether these preconditions are satisified was tested inside test_expect_success. We move these tests outside because, strictly speaking, they are not part of the tests. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2009-03-21Merge branch 'mg/test-installed'Libravatar Junio C Hamano1-3/+11
* mg/test-installed: test-lib.sh: Allow running the test suite against installed git test-lib.sh: Test for presence of git-init in the right path.
2009-03-21Merge branch 'tr/maint-1.6.0-send-email-irt' into maintLibravatar Junio C Hamano1-0/+11
* tr/maint-1.6.0-send-email-irt: send-email: test --no-thread --in-reply-to combination send-email: respect in-reply-to regardless of threading Conflicts: t/t9001-send-email.sh
2009-03-21Merge branch 'mg/maint-submodule-normalize-path' into maintLibravatar Junio C Hamano1-0/+49
* mg/maint-submodule-normalize-path: git submodule: Fix adding of submodules at paths with ./, .. and // git submodule: Add test cases for git submodule add
2009-03-21Merge branch 'js/rsync-local' into maintLibravatar Junio C Hamano1-19/+20
* js/rsync-local: rsync transport: allow local paths, and fix tests
2009-03-21Merge branch 'jc/maint-1.6.0-read-tree-overlay' into maintLibravatar Junio C Hamano1-0/+31
* jc/maint-1.6.0-read-tree-overlay: read-tree A B C: do not create a bogus index and do not segfault
2009-03-21Merge branch 'js/maint-1.6.0-path-normalize' into maint-1.6.1Libravatar Junio C Hamano2-19/+20
* js/maint-1.6.0-path-normalize: Remove unused normalize_absolute_path() Test and fix normalize_path_copy() Fix GIT_CEILING_DIRECTORIES on Windows Move sanitary_path_copy() to path.c and rename it to normalize_path_copy() Make test-path-utils more robust against incorrect use
2009-03-21Merge branch 'jc/maint-1.6.0-pack-directory' into maint-1.6.1Libravatar Junio C Hamano1-0/+17
* jc/maint-1.6.0-pack-directory: Fix odb_mkstemp() on AIX Make sure objects/pack exists before creating a new pack Conflicts: wrapper.c
2009-03-21pack-objects: don't loosen objects available in alternate or kept packsLibravatar Brandon Casey1-1/+1
If pack-objects is called with the --unpack-unreachable option then it will unpack (i.e. loosen) all unreferenced objects from local not-kept packs, including those that also exist in packs residing in an alternate object database or a locally kept pack. The only user of this option is git-repack. In this case, repack will follow the call to pack-objects with a call to prune-packed, which will delete these newly loosened objects, making the act of loosening a waste of time. The unnecessary loosening can be avoided by checking whether an object exists in a non-local pack or a locally kept pack before loosening it. This fixes the 'local packed unreachable obs that exist in alternate ODB are not loosened' test in t7700. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-21t7700: demonstrate repack flaw which may loosen objects unnecessarilyLibravatar Brandon Casey1-0/+17
If an unreferenced object exists in both a local pack and in either a pack residing in an alternate object database or a local kept pack, then the pack-objects call made by repack will loosen that object only to have it immediately pruned by repack's call to prune-packed. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-21git-branch: display "was sha1" on branch deletion rather than just "sha1"Libravatar Brandon Casey1-1/+1
Make it more pleasant to read about a branch deletion by adding "was". Jeff King suggested this, and I ignored it. He was right. Update t3200 test again to match the change in output. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>