summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)Author
2005-11-17apply: allow-binary-replacement.Junio C Hamano
A new option, --allow-binary-replacement, is introduced. When you feed a diff that records full SHA1 name of pre- and post-image blob on its index line to git-apply with this option, the post-image blob replaces the path if what you have in the working tree matches the pre-image _and_ post-image blob is already available in the object directory. Later we _might_ want to enhance the diff output to also include the full binary data of the post-image, to make this more useful, but this is good enough for local rebasing application. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-16git-apply: fail if a patch cannot be applied.Junio C Hamano
Recently we fixed 'git-apply --stat' not to barf on a binary differences. But it accidentally broke the error detection when we actually attempt to apply them. This commit fixes the problem and adds test cases. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-16Fix tests with new git in CJohannes Schindelin
GIT_EXEC_PATH *has* to be set. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-15Update topo-order test.Junio C Hamano
The recently we updated rev-list --topo-order to show the heads in date order, but we had a test that expected to see the old behaviour. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-15allow git-update-ref create refs with slashes in namesAlex Riesen
Make git-update-ref create references with slashes in them. git-branch and git-checkout already support such reference names. git-branch can use git-update-ref to create the references in a more formal manner now. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-11Merge branches 'jc/sb' and 'jc/mb'Junio C Hamano
2005-11-11t1200: use --topo-order to keep the show-branch output stable.Junio C Hamano
Because a batch-oriented script creates many commits within a second on a fast machine, show-branch output of the test results are unstable without topo-order. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-11Add test case for merge-base.Junio C Hamano
Although it was shown that the "full contamination" was not really full during the list discussion, the series improves things without incurring extra parsing cost, and here is a test to check that. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-08make tests ignorable with "make -i"Alex Riesen
Allow failed tests to be ignored using make's "-i". The patch also disables parallel make in t/. This doesn't make the testing any different as before: the tests were run sequentially before. It also allows to run more tests, ignoring the ones usually failing just to figure out if something else broke. (Or to ignore plainly uninteresting situations because of the testing being done on say... cygwin ;) Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-08fix t5000-tar-tree.sh when $TAR isn't setAlex Riesen
$TAR isn't set everywhere. Provide a default (tar) Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-05test: t4102-apply-rename fails with strict umask.Junio C Hamano
We checked the result of patch application for full permission bits, when the only thing we cared about was to make sure the executable bit was correctly set. Noticed by Peter Baumann. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-03remove CR/LF from .gitignoreAlex Riesen
For everyone cursed by dos/windows line endings (aka CRLF): The code reading the .gitignore files (excludes and excludes per directory) leaves \r in the patterns, which causes fnmatch to fail for no obvious reason. Just remove a "\r" preceding a "\n" unconditionally. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-29make t5501 less annoyingJohannes Schindelin
On Linux, "mktemp tmp-XXXX" will not work. Also, redirect stderr on which, so it does not complain too loudly. After all, this test should only be executed when old binaries are available. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-29Implement an interoperability test for fetch-pack/upload-packJohannes Schindelin
The next patches will extend the pack protocol. This test assures that this extension is compatible to earlier versions of git-fetch-pack/git-upload-pack. All you need to do to take advantage of this test, is to install older known-to-be-working binaries in the path as "old-git-fetch-pack" and "old-git-upload-pack". Note that the warning when testing with old-git-fetch-pack is to be expected (it just says that the old version was not taking advantage of all the information which the server sent). Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-29Implement a test for git-fetch-pack/git-upload-packJohannes Schindelin
This test provides a minimal example of what went wrong with the old git-fetch-pack (and now works beautifully). Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-28fix testsuite to tolerate spaces in pathPavel Roskin
This patch allows the testsuite to run properly when the full path to the git sources contains spaces or other symbols that need to be quoted. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-28Create object subdirectories on demand (phase II)Linus Torvalds
This removes the unoptimization. The previous round does not mind missing fan-out directories, but still makes sure they exist, lest older versions choke on a repository created/packed by it. This round does not play that nicely anymore -- empty fan-out directories are not created by init-db, and will stay removed by prune-packed. The prune command also removes empty fan-out directories. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-18No funny names on cygwin...Johannes Schindelin
On FAT/NTFS, filenames cannot contain tabs. So t3300-funny-names would reliably fail already when trying to create such files. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-18Adjust tests for not quoting SP.Junio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-18Add tests for funny pathnames.Junio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-16Disable hooks during tests.Junio C Hamano
Individual tests for hooks would want to have their own tests when written. Also we should not pick up from random templates the user happens to have. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-15Merge branch 'fixes'Junio C Hamano
2005-10-13Adapt tutorial to cygwin and add test caseJohannes Schindelin
Lacking reliable symlinks, the instructions in the tutorial did not work in a cygwin setup. Also, a few outputs were not correct. This patch fixes these, and adds a test case which follows the instructions of the tutorial (except git-clone, -fetch and -push, which I have not done yet). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-13Add git-index-pack utilitySergey Vlasov
git-index-pack builds a pack index file for an existing packed archive. With this utility a packed archive which was transferred without the corresponding pack index can be added to objects/pack/ without repacking. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-11Use git-update-ref and git-symbolic-ref in testsJohannes Schindelin
This makes all tests pass on cygwin. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-10Merge branch 'fixes'Junio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-10t5400-send-pack relies on a working cpioJohannes Schindelin
Since cygwin does not install cpio by default, t5400 results in a very cryptic failure. So, test for cpio explicitely. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-10Deal with $(bindir) and friends with whitespaces.Junio C Hamano
... using HPA's shellquote macro. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-10Also force LC_ALL in test scripts.Junio C Hamano
Noticed by Junichi Uekawa. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-08Create object subdirectories on demandLinus Torvalds
This makes it possible to have a "sparse" git object subdirectory structure, something that has become much more attractive now that people use pack-files all the time. As a result of pack-files, a git object directory doesn't necessarily have any individual objects lying around, and in that case it's just wasting space to keep the empty first-level object directories around: on many filesystems the 256 empty directories will be aboue 1MB of diskspace. Even more importantly, after you re-pack a project that _used_ to be unpacked, you could be left with huge directories that no longer contain anything, but that waste space and take time to look through. With this change, "git prune-packed" can just do an rmdir() on the directories, and they'll get removed if empty, and re-created on demand. This patch also tries to fix up "write_sha1_from_fd()" to use the new common infrastructure for creating the object files, closing a hole where we might otherwise leave half-written objects in the object database. [jc: I unoptimized the part that really removes the fan-out directories to ease transition. init-db still wastes 1MB of diskspace to hold 256 empty fan-outs, and prune-packed rmdir()'s the grown but empty directories, but runs mkdir() immediately after that -- reducing the saving from 150KB to 146KB. These parts will be re-introduced when everybody has the on-demand capability.] Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-08Merge branch 'fixes'Junio C Hamano
2005-10-07Fix wrong filename listing bug in git-ls-tree.robfitz@273k.net
This patch fixes a bug in git-ls-tree in which the wrong filenames are listed if the exact same file and directory contents are present in another location in the tree. Added a new series of test cases for directory and filename handling. Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-07Show original and resulting blob object info in diff output.Junio C Hamano
This adds more cruft to diff --git header to record the blob SHA1 and the mode the patch/diff is intended to be applied against, to help the receiving end fall back on a three-way merge. The new header looks like this: diff --git a/apply.c b/apply.c index 7be5041..8366082 100644 --- a/apply.c +++ b/apply.c @@ -14,6 +14,7 @@ // files that are being modified, but doesn't apply the patch // --stat does just a diffstat, and doesn't actually apply +// --show-index-info shows the old and new index info for... ... Upon receiving such a patch, if the patch did not apply cleanly to the target tree, the recipient can try to find the matching old objects in her object database and create a temporary tree, apply the patch to that temporary tree, and attempt a 3-way merge between the patched temporary tree and the target tree using the original temporary tree as the common ancestor. The patch lifts the code to compute the hash for an on-filesystem object from update-index.c and makes it available to the diff output routine. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-02[PATCH] Teach git-ls-files about '--' to denote end of options.Fredrik Kuivinen
Useful if you have a file whose name starts with a dash. Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-02More portability.Junio C Hamano
- The location of openssl development files got customizable. - The location of iconv development files got customizable. - Pass $TAR down to t5000 test so that the user can override with 'gmake TAR=gtar'. - Solaris 'bc' does not seem to grok "define abs()". There is no reason to use bc there -- expr would do. Signed-off-by: Junio C Hamano <junio@twinsun.com>
2005-10-02Add git-symbolic-refJunio C Hamano
This adds the counterpart of git-update-ref that lets you read and create "symbolic refs". By default it uses a symbolic link to represent ".git/HEAD -> refs/heads/master", but it can be compiled to use the textfile symbolic ref. The places that did 'readlink .git/HEAD' and 'ln -s refs/heads/blah .git/HEAD' have been converted to use new git-symbolic-ref command, so that they can deal with either implementation. Signed-off-by: Junio C Hamano <junio@twinsun.com>
2005-09-28Update the case table in t/t1000.Junio C Hamano
It still talked about "the proposed alternative semantics" but we have used those alternative semantics for quite some time. Update them to avoid confusion. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-27[PATCH] Make the test more shell generic and fix missing Solaris find optionPeter Eriksen
This is from Peter Eriksen, but further fixed. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-22Retire diff-helper.Junio C Hamano
The textual diff generation with built-in '-p' in diff-* brothers has proven to be useful enough that git-diff-helper outlived its usefulness. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-20Show modified files in git-ls-filesJunio C Hamano
Add -m/--modified to show files that have been modified wrt. the index. [jc: The original came from Brian Gerst on Sep 1st but it only checked if the paths were cache dirty without actually checking the files were modified. I also added the usage string and a new test.] Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-17Fix typo in test comment.Junio C Hamano
I do not know why it was spelled git-rev-tree when I meant to say git-read-tree, but the typo was left since day one. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-11[PATCH] Add debugging help for case #16 to read-tree.cJunio C Hamano
This will help us detect if real-world example merges have multiple merge-base candidates and one of them matches one head while another matches the other head. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-11[PATCH] Rewrite read-treeDaniel Barkalow
Adds support for multiple ancestors, removes --emu23, much simplification. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-09Retire support for old environment variables.Junio C Hamano
We have deprecated the old environment variable names for quite a while and now it's time to remove them. Gone are: SHA1_FILE_DIRECTORIES AUTHOR_DATE AUTHOR_EMAIL AUTHOR_NAME COMMIT_AUTHOR_EMAIL COMMIT_AUTHOR_NAME SHA1_FILE_DIRECTORY Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-09'build' scripts before installing.Junio C Hamano
Earlier we renamed git-foo.sh to git-foo while installing, which was mostly done by inertia than anything else. This however made writing tests to use scripts harder. This patch builds the scripts the same way as we build binaries from their sources. As a side effect, you can now specify non-standard paths you have your Perl binary is in when running the make. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-08[PATCH] Do not create bogus branch from flag to git branchAmos Waterland
If you run `git branch --help', you will unexpectedly have created a new branch named "--help". This simple patch adds logic and a usage statement to catch this and similar problems, and adds a testcase for it. Signed-off-by: Amos Waterland <apw@rossby.metr.ou.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-08Big tool rename.Junio C Hamano
As promised, this is the "big tool rename" patch. The primary differences since 0.99.6 are: (1) git-*-script are no more. The commands installed do not have any such suffix so users do not have to remember if something is implemented as a shell script or not. (2) Many command names with 'cache' in them are renamed with 'index' if that is what they mean. There are backward compatibility symblic links so that you and Porcelains can keep using the old names, but the backward compatibility support is expected to be removed in the near future. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-04Add copy/rename check for git-apply.Junio C Hamano
The new test pattern is taken from HPA's klibc and klibc-kbuild trees, which has many interesting renames (the commits 001eef5a19219e5b0601068a3d13874b88c0653e and 0037d1bc0deaf7daec3778496656cb04b4e4b9d0). The test pattern exposes problems in the apply.c changes currently in the proposed updates branch. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-28[PATCH] New git-apply test cases for scanning forwards and backwards.Robert Fitzsimons
Added a new test case for the scanning forwards and backwards for the correct location to apply a patch fragment. Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-28[PATCH] New git-apply test cases for patches with mulitple fragments.Robert Fitzsimons
Added a test case for patches with multiple fragments. Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>