summaryrefslogtreecommitdiff
path: root/t
Commit message (Collapse)AuthorAgeFilesLines
* GIT 1.1.0v1.1.0Junio C Hamano2006-01-081-1/+1
|\
| * Fix typo in debug stanza of t2001Yann Dirson2006-01-071-1/+1
| | | | | | | | | | Signed-off-by: Yann Dirson <ydirson@altern.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Add a test for rebase when a change was picked upstreamYann Dirson2006-01-081-0/+53
| | | | | | | | | | | | | | This test exercises the standard feature that makes rebase useful. Signed-off-by: Yann Dirson <ydirson@altern.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Add a minimal test for git-cherryYann Dirson2006-01-081-0/+53
| | | | | | | | | | | | | | | | | | | | | | This test checks that git-cherry finds the expected number of patches in two simple cases, and then tests the new limit arguments. [jc: collapsed two patches into one and added sleep to make sure the two commits would get different timestamps] Signed-off-by: Yann Dirson <ydirson@altern.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | ls-files --others --directory: testJunio C Hamano2006-01-071-6/+28
| | | | | | | | | | | | Add a test to run with --directory option. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge fixes up to GIT 1.0.7Junio C Hamano2006-01-056-18/+44
|\ \ | |/ | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * t3300: skip when filesystem does not like TAB in filenames.Junio C Hamano2006-01-051-3/+6
| | | | | | | | | | | | | | Instead of checking Cygwin explicitly, see if the filesystem lets us create funny filenames. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * trivial: check, if t/trash directory was successfully createdAlex Riesen2006-01-051-1/+1
| | | | | | | | | | | | | | | | and was successfully entered. Otherwise git-init-db will create it directly in the working directory (t/) which can be dangerous. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * trivial: use git-repo-config to detect how to run tests in the test repositoryAlex Riesen2006-01-052-7/+22
| | | | | | | | | | Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * trivial: use git-repo-config to detect if the test can be run on the repositoryAlex Riesen2006-01-051-0/+8
| | | | | | | | | | Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Fix skipping merge-order test with NO_OPENSSL=1.Gerrit Pape2005-12-281-7/+7
| | | | | | | | | | | | | | | | | | | | Move git-rev-list --merge-order usage check for 'OpenSSL not linked' after test 1; we cannot trigger this unless we try to actually use --merge-order by giving some ref, and we do not have any ref until we run the first test to create commits. Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge fixes up to GIT 1.0.6Junio C Hamano2005-12-273-3/+3
|\ \ | |/
| * Fix bogus tests on rev-list output.Junio C Hamano2005-12-272-2/+2
| | | | | | | | | | | | | | | | | | | | | | These tests seem to mean checking the output with expected result, but was not doing its handrolled test helper function. Also fix the guard to workaround wc output that have whitespace padding, which was broken but not exposed because the test was not testing it ;-). Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Guard a test against wc that pads its output with whitespaceJunio C Hamano2005-12-271-1/+1
| | | | | | | | | | | | Spotted by Johannes. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge fixes up to GIT 1.0.5Junio C Hamano2005-12-262-1/+92
|\ \ | |/
| * Handle symlinks graciouslyJohannes Schindelin2005-12-261-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | This patch converts a stat() to an lstat() call, thereby fixing the case when the date of a symlink was not the same as the one recorded in the index. The included test case demonstrates this. This is for the case that the symlink points to a non-existing file. If the file exists, worse things than just an error message happen. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * t5300: avoid false failures.Junio C Hamano2005-12-261-1/+7
| | | | | | | | | | | | | | | | | | Johannes found that the test has 1/256 chance of falsely producing an uncorrupted idx file, causing the check to detect corruption fail. Now we have 1/2^160 chance of false failure ;-). Signed-off-by: Junio C Hamano <junkio@cox.net>
| * check_packed_git_idx(): check integrity of the idx file itself.Junio C Hamano2005-12-231-0/+7
| | | | | | | | | | | | | | | | | | | | | | Although pack-check.c had routine to verify the checksum for the pack index file itself, the core did not check it before using it. This is stolen from the patch to tighten packname requirements. Signed-off-by: Junio C Hamano <junkio@cox.net> (cherry picked from 797bd6f490c91c07986382b9f268e0df712cb246 commit)
* | check_packed_git_idx(): check integrity of the idx file itself.Junio C Hamano2005-12-221-0/+7
| | | | | | | | | | | | | | | | | | | | Although pack-check.c had routine to verify the checksum for the pack index file itself, the core did not check it before using it. This is stolen from the patch to tighten packname requirements. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | merge-recursive: conflicting rename case.Junio C Hamano2005-12-211-0/+37
|/ | | | | | | | | | | | | | | | This changes the way the case two branches rename the same path to different paths is handled. Earlier, the code removed the original path and added both destinations to the index at stage0. This commit changes it to leave the original path at stage1, and two destination paths at stage2 and stage3, respectively. [jc: I am not really sure if this makes much difference in the real life merge situations. What should happen when our branch renames A to B and M to N, while their branch renames A to M? That is, M remains in our tree as is.] Signed-off-by: Junio C Hamano <junkio@cox.net>
* Racy GIT (part #2)Junio C Hamano2005-12-201-4/+13
| | | | | | | | | The previous round caught the most trivial case well, but broke down once index file is updated again. Smudge problematic entries (they should be very few if any under normal interactive workflow) before writing a new index file out. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Racy GITJunio C Hamano2005-12-201-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the longstanding "Racy GIT" problem, which was pretty much there from the beginning of time, but was first demonstrated by Pasky in this message on October 24, 2005: http://marc.theaimsgroup.com/?l=git&m=113014629716878 If you run the following sequence of commands: echo frotz >infocom git update-index --add infocom echo xyzzy >infocom so that the second update to file "infocom" does not change st_mtime, what is recorded as the stat information for the cache entry "infocom" exactly matches what is on the filesystem (owner, group, inum, mtime, ctime, mode, length). After this sequence, we incorrectly think "infocom" file still has string "frotz" in it, and get really confused. E.g. git-diff-files would say there is no change, git-update-index --refresh would not even look at the filesystem to correct the situation. Some ways of working around this issue were already suggested by Linus in the same thread on the same day, including waiting until the next second before returning from update-index if a cache entry written out has the current timestamp, but that means we can make at most one commit per second, and given that the e-mail patch workflow used by Linus needs to process at least 5 commits per second, it is not an acceptable solution. Linus notes that git-apply is primarily used to update the index while processing e-mailed patches, which is true, and git-apply's up-to-date check is fooled by the same problem but luckily in the other direction, so it is not really a big issue, but still it is disturbing. The function ce_match_stat() is called to bypass the comparison against filesystem data when the stat data recorded in the cache entry matches what stat() returns from the filesystem. This patch tackles the problem by changing it to actually go to the filesystem data for cache entries that have the same mtime as the index file itself. This works as long as the index file and working tree files are on the filesystems that share the same monotonic clock. Files on network mounted filesystems sometimes get skewed timestamps compared to "date" output, but as long as working tree files' timestamps are skewed the same way as the index file's, this approach still works. The only problematic files are the ones that have the same timestamp as the index file's, because two file updates that sandwitch the index file update must happen within the same second to trigger the problem. Signed-off-by: Junio C Hamano <junkio@cox.net>
* tests: make scripts executableJunio C Hamano2005-12-198-0/+0
| | | | | | just for consistency. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Revert "get_sha1_basic(): corner case ambiguity fix"Junio C Hamano2005-12-171-48/+0
| | | | | | | This reverts 6677c4665af2d73f670bec382bc82d0f2e9513fb commit. The misguided disambiguation has been reverted, so there is no point testing that misfeature.
* get_sha1_basic(): corner case ambiguity fixJunio C Hamano2005-12-152-0/+49
| | | | | | | | | | | | | | When .git/refs/heads/frotz and .git/refs/tags/frotz existed, and the object name stored in .git/refs/heads/frotz were corrupt, we ended up picking tags/frotz without complaining. Worse yet, if the corrupt .git/refs/heads/frotz was more than 40 bytes and began with hexadecimal characters, it silently overwritten the initial part of the returned result. This commit adds a couple of tests to demonstrate these cases, with a fix. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git rebase loses author name/email if given bad email addressAmos Waterland2005-12-141-0/+34
| | | | | | | | | | | If GIT_AUTHOR_EMAIL is of a certain form, `git rebase master' will blow away the author name and email when fast-forward merging commits. I have not tracked it down, but here is a testcase that demonstrates the behavior. Signed-off-by: Amos Waterland <apw@us.ibm.com> Acked-by: Michal Ostrowski <mostrows@watson.ibm.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* t3200: branch --help does not die anymore.Junio C Hamano2005-12-141-2/+2
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Make git-send-pack exit with error when some refs couldn't be pushed outPetr Baudis2005-12-131-1/+9
| | | | | | | | | | | | In case some refs couldn't be pushed out due to an error (mostly the not-a-proper-subset error), make git-send-pack exit with non-zero status after the push is over (that is, it still tries to push out the rest of the refs). [jc: I adjusted a test for this change.] Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Revert "Add deltifier test."Junio C Hamano2005-12-121-43/+0
| | | | | This reverts e726715a52e25d8035c89d4ea09398599610737e commit, because reverting diff-delta emptiness change would break this test.
* Add deltifier test.Junio C Hamano2005-12-121-0/+43
| | | | | | | | | | | | This test kicks in only if you built test-delta executable, and makes sure that the basic delta routine is working properly even on empty files. This commit is to make sure we have a test to catch the breakage. The delitifier code is still broken, which will be fixed with the next commit. Signed-off-by: Junio C Hamano <junkio@cox.net>
* t/t6022: a new test for renaming merge.Junio C Hamano2005-12-111-0/+164
| | | | | | | | | | | | | | | | | | | This adds a couple of tests to cover the following renaming merge cases: - one side renames and the other side does not, with and without content conflicts. - both side rename to the same path, with and without content conflicts. The test setup also prepares a case in which both side rename to different destination, but currently the code collapses these destination paths and removes the original path, which may be wrong. The outcome of this case is not checked by the tests in this round. Signed-off-by: Junio C Hamano <junkio@cox.net>
* t0000: catch trivial pilot errors.Junio C Hamano2005-12-102-2/+36
| | | | | | | | People seem to be getting test failure from t6021 not becuase git is faulty but because they forgot to install "merge". Check this and other trivial pilot errors in the first test. Signed-off-by: Junio C Hamano <junkio@cox.net>
* t3300: funny name testJunio C Hamano2005-12-101-14/+14
| | | | | | Add double quote character to the test pattern. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Use GIT_EXEC_PATH explicitly for initial git-init-db in tests.Junio C Hamano2005-12-091-3/+2
| | | | | | | | This is just a belts-and-suspenders check, but makes sure we have both "git" and "git-init-db" built, executable, and checking. Signed-off-by: Junio C Hamano <junkio@cox.net>
* use "git init-db" in testsAlex Riesen2005-12-091-2/+2
| | | | | | | | | | | This is to catch an error where tests are run without first building what are being tested. Relying on prefixing $PATH with the build directory and expect that the PATH mechanism would find what we just built would silently run an already installed binaries from the PATH. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Make sure we use compat/subprocess.py with Python 2.3 while running tests.Junio C Hamano2005-12-071-1/+12
| | | | | | Otherwise the test will not succeed without installing. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix 5501 testJunio C Hamano2005-12-051-4/+9
| | | | | | | | | | | | | | | | Not everybody can rely on /bin/sh to be sane, and we support SHELL_PATH for that. Use it. mktemp(1) is not used anywhere else in the core git. Do not introduce dependency on it. Not everybody's "which" gives a sane return value. For example, on Solaris 'which XXX' says "no XXX in /usr/bin /bin ..." and exits with zero status. The lesson here is to never use 'which' in your scripts. Signed-off-by: Junio C Hamano <junkio@twinsun.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* config.c: remove unnecessary header in minimum configuration file.Junio C Hamano2005-12-051-20/+0
| | | | | | | It is just silly to start the file called "config" with a comment that says "This is the config file." Signed-off-by: Junio C Hamano <junkio@cox.net>
* New test case: Criss-cross mergeFredrik Kuivinen2005-12-031-0/+92
| | | | | Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* New test case: merge with directory/file conflictsFredrik Kuivinen2005-12-031-0/+25
| | | | | Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* test-lib.sh: Add new function, test_expect_codeFredrik Kuivinen2005-12-031-0/+13
| | | | | | | The test is considered OK if it exits with code $1 Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* t3100: add ls-tree -t and -d tests.Junio C Hamano2005-12-011-0/+38
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
*-. Merge branches 'jc/apply', 'lt/ls-tree', 'lt/bisect' and 'lt/merge'Junio C Hamano2005-11-303-56/+22
|\ \
| | * ls-tree: match the test to the new semantics.Junio C Hamano2005-11-283-56/+22
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | The diff for this commit is a good illustration of what changed in ls-tree behaviour. - With -r, tree nodes themselves are not shown anymore, but blobs in subtrees are shown. - The order of paths parameters do not matter, since they are not like arguments to /bin/ls, but are filter patterns. - When filter patterns overlap, unintuitive things happen. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | [PATCH] Add tests for git-mv in subdirectoriesAlex Riesen2005-11-291-0/+27
|/ | | | | | | | | | | | Junio C Hamano, Sat, Nov 26, 2005 03:45:52 +0100: > I haven't seriously used git-mv myself, so > somebody needs to test it, and if it actually works and Ack on > it, please. It actually works in subdirs. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Rename git-config-set to git-repo-configJohannes Schindelin2005-11-241-26/+26
| | | | | | | ... and adjust all references. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Allow hierarchical section namesJohannes Schindelin2005-11-211-0/+19
| | | | | | | | | | | | | | | | | | | A .git/config like follows becomes valid with this patch: [remote.junio] url = git://git.kernel.org/pub/scm/git/git.git pull = master:junio todo:todo +pu:pu [remote.ibook] url = ibook:git/ pull = master:ibook push = master:quetzal (This patch only does the ini file thing, git-fetch and friends still ignore these values). Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-config-set: support selecting values by non-matching regexJohannes Schindelin2005-11-201-0/+28
| | | | | | | | | | | | | | | | | Extend the regex syntax of value_regex so that prepending an exclamation mark means non-match: [core] quetzal = "Dodo" for Brainf*ck quetzal = "T. Rex" for Malbolge quetzal = "cat" You can match the third line with git-config-set --get quetzal '! for ' Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-config-set: add more optionsJohannes Schindelin2005-11-191-0/+224
| | | | | | | | | | | | ... namely --replace-all, to replace any amount of matching lines, not just 0 or 1, --get, to get the value of one key, --get-all, the multivar version of --get, and --unset-all, which deletes all matching lines from .git/config Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* tests: binary diff application.Junio C Hamano2005-11-161-10/+39
| | | | | | | This adds more tests to cover cases where binary diff application succeeds. Signed-off-by: Junio C Hamano <junkio@cox.net>