aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Merge branch 'bc/maint-1.6.1-branch-deleted-was'Junio C Hamano2009-03-26
|\ | | | | | | | | | | | | | | * bc/maint-1.6.1-branch-deleted-was: git-branch: display "was sha1" on branch deletion rather than just "sha1" Conflicts: builtin-branch.c
| * git-branch: display "was sha1" on branch deletion rather than just "sha1"Brandon Casey2009-03-21
| | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'fg/push-default'Junio C Hamano2009-03-26
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | * fg/push-default: builtin-push.c: Fix typo: "anythig" -> "anything" Display warning for default git push with no push.default config New config push.default to decide default behavior for push Conflicts: Documentation/config.txt
| * | builtin-push.c: Fix typo: "anythig" -> "anything"Kevin Ballard2009-03-25
| | | | | | | | | | | | | | | Signed-off-by: Kevin Ballard <kevin@sb.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Display warning for default git push with no push.default configFinn Arne Gangstad2009-03-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a git push without any refspecs is attempted, display a warning. The current default behavior is to push all matching refspecs, which may come as a surprise to new users, so the warning shows how push.default can be configured and what the possible values are. Traditionalists who wish to keep the current behaviour are also told how to configure this once and never see the warning again. Signed-off-by: Finn Arne Gangstad <finnag@pvv.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | New config push.default to decide default behavior for pushFinn Arne Gangstad2009-03-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When "git push" is not told what refspecs to push, it pushes all matching branches to the current remote. For some workflows this default is not useful, and surprises new users. Some have even found that this default behaviour is too easy to trigger by accident with unwanted consequences. Introduce a new configuration variable "push.default" that decides what action git push should take if no refspecs are given or implied by the command line arguments or the current remote configuration. Possible values are: 'nothing' : Push nothing; 'matching' : Current default behaviour, push all branches that already exist in the current remote; 'tracking' : Push the current branch to whatever it is tracking; 'current' : Push the current branch to a branch of the same name, i.e. HEAD. Signed-off-by: Finn Arne Gangstad <finnag@pvv.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'dm/maint-docco'Junio C Hamano2009-03-26
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dm/maint-docco: Documentation: Remove spurious uses of "you" in git-bisect.txt. Documentation: minor grammatical fix in git-check-ref-format.txt Documentation: minor grammatical fixes in git-check-attr.txt Documentation: minor grammatical fixes in git-cat-file.txt Documentation: minor grammatical fixes and rewording in git-bundle.txt Documentation: remove some uses of the passive voice in git-bisect.txt
| * | | Documentation: Remove spurious uses of "you" in git-bisect.txt.David J. Mellor2009-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were added by accident in a42dea3. This patch also rewords the description of how ranges of commits can be skipped. Signed-off-by: David J. Mellor <dmellor@whistlingcat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Documentation: minor grammatical fix in git-check-ref-format.txtDavid J. Mellor2009-03-22
| | | | | | | | | | | | | | | | | | | | Signed-off-by: David J. Mellor <dmellor@whistlingcat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Documentation: minor grammatical fixes in git-check-attr.txtDavid J. Mellor2009-03-22
| | | | | | | | | | | | | | | | | | | | Signed-off-by: David J. Mellor <dmellor@whistlingcat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Documentation: minor grammatical fixes in git-cat-file.txtDavid J. Mellor2009-03-22
| | | | | | | | | | | | | | | | | | | | Signed-off-by: David J. Mellor <dmellor@whistlingcat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Documentation: minor grammatical fixes and rewording in git-bundle.txtDavid J. Mellor2009-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit also converts all reference specifications to a monospaced font, as the embedded ~ character used in some of the references sometimes causes the text up to the next ~ to be displayed incorrectly as a subscript when the HTML pages are generated. This was tested with asciidoc 8.2.5. Signed-off-by: David J. Mellor <dmellor@whistlingcat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Documentation: remove some uses of the passive voice in git-bisect.txtDavid J. Mellor2009-03-22
| | | | | | | | | | | | | | | | | | | | Signed-off-by: David J. Mellor <dmellor@whistlingcat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | fast-export: Avoid dropping files from commitsElijah Newren2009-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Grammar fixes to "merge" and "patch-id" docsWincent Colaiuta2009-03-25
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Wincent Colaiuta <win@wincent.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Correct missing SP characters in grammar comment at top of fast-import.cElijah Newren2009-03-25
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Elijah Newren <newren@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | git-filter-branch: avoid collisions with variables in eval'ed commandsElijah Newren2009-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid using simple variable names like 'i', since user commands are eval'ed and may clash with and overwrite our values. Signed-off-by: Elijah Newren <newren@gmail.com> Acked-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'for-junio' of git://repo.or.cz/git/mingw/j6tJunio C Hamano2009-03-25
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * '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
| * | | | t7502-commit: Skip SIGTERM test on WindowsJohannes Sixt2009-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | t7005-editor: Use $SHELL_PATH in the editor scriptsJohannes Sixt2009-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | Guard a few Makefile variables against user environmentsJohannes Schindelin2009-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some variables are not initialized in the Makefile, but appended to. If the user has those variables in her environment, it will break the build. The variable names were found using these commands: $ s='[ \t]'; $ S='[^ \t]'; $ comm -23 \ <(sed -n "s/^$s*\($S*\)$s$s*+=.*/\1/p" < Makefile | sort | uniq) \ <(sed -n "s/^$s*\($S*\)$s$s*=.*/\1/p" < Makefile | sort | uniq) This fixes msysGit issue 216. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'maint'Junio C Hamano2009-03-24
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: Increase the size of the die/warning buffer to avoid truncation close_sha1_file(): make it easier to diagnose errors avoid possible overflow in delta size filtering computation
| * | | | | Increase the size of the die/warning buffer to avoid truncationShawn O. Pearce2009-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Long messages like those from lockfile.c when a lock can't be obtained truncate with only 256 bytes in the message buffer. Bump it to 1024 to give more space for these longer cases. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | Merge branch 'maint-1.6.1' into maintJunio C Hamano2009-03-24
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint-1.6.1: close_sha1_file(): make it easier to diagnose errors avoid possible overflow in delta size filtering computation
| | * \ \ \ \ Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano2009-03-24
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint-1.6.0: close_sha1_file(): make it easier to diagnose errors avoid possible overflow in delta size filtering computation
| | | * | | | | close_sha1_file(): make it easier to diagnose errorsLinus Torvalds2009-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A bug report with "unable to write sha1 file" made us realize that we do not have enough information to guess why close() is failing. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | | * | | | | avoid possible overflow in delta size filtering computationNicolas Pitre2009-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On a 32-bit system, the maximum possible size for an object is less than 4GB, while 64-bit systems may cope with larger objects. Due to this limitation, variables holding object sizes are using an unsigned long type (32 bits on 32-bit systems, or 64 bits on 64-bit systems). When large objects are encountered, and/or people play with large delta depth values, it is possible for the maximum allowed delta size computation to overflow, especially on a 32-bit system. When this occurs, surviving result bits may represent a value much smaller than what it is supposed to be, or even zero. This prevents some objects from being deltified although they do get deltified when a smaller depth limit is used. Fix this by always performing a 64-bit multiplication. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Add warning about known issues to documentation of cvsimportHeiko Voigt2009-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The described issues are compiled from the tests by Michael Haggerty and me. Because it is not apparent that these can be fixed anytime soon at least warn unwary users not to rely on the inbuilt cvsimport to much. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | completion: add --thread=deep/shallow to format-patchStephen Boyd2009-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Stephen Boyd <bebarino@gmail.com> Trivially-Acked-By: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | completion: add --cc and --no-attachment option to format-patchStephen Boyd2009-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Stephen Boyd <bebarino@gmail.com> Trivially-Acked-By: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | completion: add --annotate option to send-emailStephen Boyd2009-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Stephen Boyd <bebarino@gmail.com> Trivially-Acked-By: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | MinGW: Quote arguments for subprocesses that contain a single-quoteJohannes Sixt2009-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before a process can be spawned by mingw_spawnve, arguments must be surrounded by double-quotes if special characters are present. This is necessary because the startup code of the spawned process will expand arguments that look like glob patterns. "Normal" Windows command line utilities expand only * and ?, but MSYS programs, including bash, are different: They also expand braces, and this has already been taken care of by compat/mingw.c:quote_arg(). But MSYS programs also treat single-quotes in a special way: Arguments between single-quotes are spliced together (with spaces) into a word. With this patch this treatment is avoided by quoting arguments that contain single-quotes. This lets t4252 pass on Windows. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'js/windows-tests'Junio C Hamano2009-03-24
|\ \ \ \ \ \ \ \ | | |_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * | | | | | | t0060: fix whitespace in "wc -c" invocationJeff King2009-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | t5503: GIT_DEBUG_SEND_PACK is not supported on MinGWJohannes Sixt2009-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | t7004: Use prerequisite tags to skip tests that need gpgJohannes Sixt2009-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | Use prerequisites to skip tests that need unzipJohannes Sixt2009-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Johannes Sixt <j6t@kdbg.org>
| * | | | | | | t3700: Skip a test with backslashes in pathspecJohannes Sixt2009-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | Skip tests that require a filesystem that obeys POSIX permissionsJohannes Sixt2009-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Johannes Sixt <j6t@kdbg.org>
| * | | | | | | t0060: Fix tests on WindowsJohannes Sixt2009-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | Use prerequisite tags to skip tests that depend on symbolic linksJohannes Sixt2009-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | t9100, t9129: Use prerequisite tags for UTF-8 testsJohannes Sixt2009-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Johannes Sixt <j6t@kdbg.org>
| * | | | | | | t5302: Use prerequisite tags to skip 64-bit offset testsJohannes Sixt2009-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | Skip tests that fail if the executable bit is not handled by the filesystemJohannes Sixt2009-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Johannes Sixt <j6t@kdbg.org>
| * | | | | | | t3600: Use test prerequisite tagsJohannes Sixt2009-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | test-lib: Infrastructure to test and check for prerequisitesJohannes Sixt2009-03-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some tests can be run only if a particular prerequisite is available. For example, some tests require that an UTF-8 locale is available. Here we introduce functions that are used in this way: 1. Insert code that checks whether the prerequisite is available. If it is, call test_set_prereq with an arbitrary tag name that subsequently can be used to check for the prerequisite: case $LANG in *.utf-8) test_set_prereq UTF8 ;; esac 2. In the calls to test_expect_success pass the tag name: test_expect_success UTF8 '...description...' '...tests...' 3. There is an auxiliary predicate that can be used anywhere to test for a prerequisite explicitly: if test_have_prereq UTF8 then ...code to be skipped if prerequisite is not available... fi Signed-off-by: Johannes Sixt <j6t@kdbg.org>
| * | | | | | | t0050: Check whether git init detected symbolic link support correctlyJohannes Sixt2009-03-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Johannes Sixt <j6t@kdbg.org>
| * | | | | | | Tests on Windows: $(pwd) must return Windows-style pathsJohannes Sixt2009-03-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many tests pass $(pwd) in some form to git and later test that the output of git contains the correct value of $(pwd). For example, the test of 'git remote show' sets up a remote that contains $(pwd) and then the expected result must contain $(pwd). Again, MSYS-bash's path mangling kicks in: Plain $(pwd) uses the MSYS style absolute path /c/path/to/git. The test case would write this name into the 'expect' file. But when git is invoked, MSYS-bash converts this name to the Windows style path c:/path/to/git, and git would produce this form in the result; the test would fail. We fix this by passing -W to bash's pwd that produces the Windows-style path. There are a two cases that need an accompanying change: - In t1504 the value of $(pwd) becomes part of a path list. In this case, the lone 'c' in something like /foo:c:/path/to/git:/bar inhibits MSYS-bashes path mangling; IOW in this case we want the /c/path/to/git form to allow path mangling. We use $PWD instead of $(pwd), which always has the latter form. - In t6200, $(pwd) - the Windows style path - must be used to construct the expected result because that is the path form that git sees. (The change in the test itself is just for consistency: 'git fetch' always sees the Windows-style path, with or without the change.) Signed-off-by: Johannes Sixt <j6t@kdbg.org>
| * | | | | | | test-lib: Work around missing sum on WindowsJohannes Sixt2009-03-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | t1002-read-tree-m-u-2way.sh uses 'sum', but it does not rely on the exact form of the sum, only that it is a hash digest. Therefore, we can sneak in 'md5sum' under the name 'sum'. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
| * | | | | | | test-lib: Work around incompatible sort and find on WindowsJohannes Sixt2009-03-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the PATH lists the Windows system directories before the MSYS directories, Windows's own incompatible sort and find commands would be picked up. We implement these commands as functions and call the real tools by absolute path. Signed-off-by: Johannes Sixt <j6t@kdbg.org>