aboutsummaryrefslogtreecommitdiff
path: root/t
Commit message (Collapse)AuthorAge
* get_sha1_basic(): corner case ambiguity fixJunio C Hamano2005-12-15
| | | | | | | | | | | | | | 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-14
| | | | | | | | | | | 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-14
| | | | 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-13
| | | | | | | | | | | | 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-12
| | | | | This reverts e726715a52e25d8035c89d4ea09398599610737e commit, because reverting diff-delta emptiness change would break this test.
* Add deltifier test.Junio C Hamano2005-12-12
| | | | | | | | | | | | 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-11
| | | | | | | | | | | | | | | | | | | 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-10
| | | | | | | | 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-10
| | | | | | 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-09
| | | | | | | | 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-09
| | | | | | | | | | | 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-07
| | | | | | Otherwise the test will not succeed without installing. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix 5501 testJunio C Hamano2005-12-05
| | | | | | | | | | | | | | | | 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-05
| | | | | | | 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-03
| | | | | 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-03
| | | | | 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-03
| | | | | | | 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-01
| | | | 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-30
|\ \
| | * ls-tree: match the test to the new semantics.Junio C Hamano2005-11-28
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-29
|/ | | | | | | | | | | | 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-24
| | | | | | | ... 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-21
| | | | | | | | | | | | | | | | | | | 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-20
| | | | | | | | | | | | | | | | | 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-19
| | | | | | | | | | | | ... 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-16
| | | | | | | This adds more tests to cover cases where binary diff application succeeds. Signed-off-by: Junio C Hamano <junkio@cox.net>
* apply: allow-binary-replacement.Junio C Hamano2005-11-16
| | | | | | | | | | | | | | | | 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>
* git-apply: fail if a patch cannot be applied.Junio C Hamano2005-11-16
| | | | | | | | | | 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>
* Fix tests with new git in CJohannes Schindelin2005-11-15
| | | | | | | 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>
* Update topo-order test.Junio C Hamano2005-11-14
| | | | | | | | 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>
* allow git-update-ref create refs with slashes in namesAlex Riesen2005-11-14
| | | | | | | | | | 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>
*-. Merge branches 'jc/sb' and 'jc/mb'Junio C Hamano2005-11-11
|\ \
| | * Add test case for merge-base.Junio C Hamano2005-11-11
| |/ |/| | | | | | | | | | | | | 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>
| * t1200: use --topo-order to keep the show-branch output stable.Junio C Hamano2005-11-11
|/ | | | | | | | 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>
* make tests ignorable with "make -i"Alex Riesen2005-11-08
| | | | | | | | | | | | | 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>
* fix t5000-tar-tree.sh when $TAR isn't setAlex Riesen2005-11-08
| | | | | | | $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>
* test: t4102-apply-rename fails with strict umask.Junio C Hamano2005-11-05
| | | | | | | | | | 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>
* remove CR/LF from .gitignoreAlex Riesen2005-11-02
| | | | | | | | | | | 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>
* make t5501 less annoyingJohannes Schindelin2005-10-28
| | | | | | | | | 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>
* Implement an interoperability test for fetch-pack/upload-packJohannes Schindelin2005-10-28
| | | | | | | | | | | | | | | | 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>
* Implement a test for git-fetch-pack/git-upload-packJohannes Schindelin2005-10-28
| | | | | | | | 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>
* fix testsuite to tolerate spaces in pathPavel Roskin2005-10-28
| | | | | | | | 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>
* Create object subdirectories on demand (phase II)Linus Torvalds2005-10-28
| | | | | | | | | | | | 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>
* No funny names on cygwin...Johannes Schindelin2005-10-18
| | | | | | | | 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>
* Adjust tests for not quoting SP.Junio C Hamano2005-10-17
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add tests for funny pathnames.Junio C Hamano2005-10-17
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Disable hooks during tests.Junio C Hamano2005-10-16
| | | | | | | | 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>
* Merge branch 'fixes'Junio C Hamano2005-10-15
|\
| * Adapt tutorial to cygwin and add test caseJohannes Schindelin2005-10-13
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Add git-index-pack utilitySergey Vlasov2005-10-12
| | | | | | | | | | | | | | | | | | | | 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>