tests


Log

Author Commit Date CI Message
Carlos Martín Nieto 2601fcfc 2011-06-28T15:21:44 Add tests for deleting a config var Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
nulltoken a01acc47 2011-07-03T14:03:43 signature: straighten the creation of a signature - Fails on empty name and/or email - Trims leading and trailing spaces of name and email
nulltoken 42a1b5e1 2011-07-01T17:59:10 signature: enhance relaxed parsing of bogus signatures Final fix for issue #278
schu 60caf024 2011-06-28T17:06:06 t04-commit: add tests for git_signature__parse git_signature__parse used to be very strict about what's a well-formed signature. Add tests checking git_signature__parse can stick with "unexpected" signatures (IOW no author name and / or no email, etc). Signed-off-by: schu <schu-github@schulog.org>
Vicent Marti eec3fe39 2011-07-05T01:11:33 fileutils: Finish dropping the old `prettify_path`
Vicent Marti 5ad739e8 2011-07-04T20:05:11 fileops: Drop `git_fileops_prettify_path` The old `git_fileops_prettify_path` has been replaced with `git_path_prettify`. This is a much simpler method that uses the OS's `realpath` call to obtain the full path for directories and resolve symlinks. The `realpath` syscall is the original POSIX call in Unix system and an emulated version under Windows using the Windows API.
Vicent Marti f79026b4 2011-07-04T11:43:34 fileops: Cleanup Cleaned up the structure of the whole OS-abstraction layer. fileops.c now contains a set of utility methods for file management used by the library. These are abstractions on top of the original POSIX calls. There's a new file called `posix.c` that contains emulations/reimplementations of all the POSIX calls the library uses. These are prefixed with `p_`. There's a specific posix file for each platform (win32 and unix). All the path-related methods have been moved from `utils.c` to `path.c` and have their own prefix.
Kirill A. Shutemov 932d1baf 2011-06-30T19:52:34 cleanup: remove trailing spaces Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Kirill A. Shutemov fe5babac 2011-06-30T00:16:23 filebuf: fix endless loop on writing buf > WRITE_BUFFER_SIZE Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
nulltoken 6ac91dfe 2011-06-29T14:06:18 Hide ".git" directory on Windows upon creation of a non bare repository Directory which name starts with a dot are hidden on Linux platforms. This patch makes libgit2 behaves similarly on Windows.
Vicent Marti 7376ad99 2011-06-29T11:01:35 refs: Remove duplicate rename method `git_reference_rename` now takes a `force` flag
Vicent Marti ab7941b5 2011-06-28T21:04:59 test: Properly show error messages
Vicent Marti 5cf1f909 2011-06-28T20:27:38 test: Print last error message properly
Vicent Marti c682886e 2011-06-28T21:09:22 repo: Rename HEAD-related methods
Vicent Martí ccd59372 2011-06-28T10:44:19 Merge pull request #279 from carlosmn/detached-orphan Add detached and orphan convenience functions
Vicent Marti d5afc039 2011-06-28T19:15:48 Remove redundant methods from the API A bunch of redundant methods have been removed from the external API. - All the reference/tag creation methods with `_f` are gone. The force flag is now passed as an argument to the normal create methods. - All the different commit creation methods are gone; commit creation now always requires a `git_commit` pointer for parents and a `git_tree` pointer for tree, to ensure that corrupted commits cannot be generated. - All the different tag creation methods are gone; tag creation now always requires a `git_object` pointer to ensure that tags are not created to inexisting objects.
Carlos Martín Nieto f5e09d60 2011-06-28T14:11:24 Add tests for detached and orphan Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Vicent Marti 3101a3e5 2011-06-23T02:28:29 refs: Do not overflow when normalizing refnames
schu 24bd5e55 2011-06-20T10:40:21 Add test case checking GIT_FILEBUF_APPEND Signed-off-by: schu <schu-github@schulog.org>
Vicent Marti 2a406ab5 2011-06-18T02:08:56 config: Fix sorting of repository config files
Vicent Marti dbe70bd5 2011-06-18T01:12:58 config: Fix compilation in MSVC
Vicent Marti 07ff8817 2011-06-18T00:39:39 config: Cleanup external API Do not mess with environment variables anymore. The new external API has more helper methods, and everything is explicit.
Carlos Martín Nieto f3dad3ac 2011-06-16T20:06:36 Add fall-back support to the configuration If a config has several files, we need to check all of them before we can say that a variable doesn't exist. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto 3de5df7d 2011-06-16T19:56:48 Add a test for overriding config The repo's configuration should take precedence over the global one. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto 3d5a02b6 2011-06-16T20:30:40 Plug an index leak The test wasn't updated when repos lost ownership of indices Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto 038d2fc3 2011-06-16T20:24:51 Plug leaks in the repo discovery tests Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Vicent Marti fa48608e 2011-06-16T02:36:21 oid: Rename methods Yeah. Finally. Fuck the old names, this ain't POSIX and they don't make any sense at all.
Vicent Martí 607d1643 2011-06-15T17:24:04 Merge pull request #248 from carlosmn/config Implement config writing
Vicent Martí ef9a6f4c 2011-06-15T13:47:41 Merge pull request #261 from Romain-Geissler/discovery-path-v2 Fix: GIT_PATH_PATH_SEPARATOR is now a semi-colon under Windows.
Romain Geissler 0657e46d 2011-06-15T12:36:08 Fix: GIT_PATH_PATH_SEPARATOR is now a semi-colon under Windows. GIT_PATH_LIST_SEPARATOR and GIT_PATH_MAX are made public so that it's can be used by a client.
Vicent Martí f2bb894e 2011-06-15T12:15:11 Merge pull request #251 from nulltoken/fix/msvc-warnings Fix compilation warnings in MSVC
Vicent Martí 1aa1b09e 2011-06-15T12:11:59 Merge pull request #260 from nulltoken/fix/git_index_add Fix git_index_add()
nulltoken 8e11e707 2011-06-15T16:06:20 git_index_add: enforce test coverage
Vicent Marti b0233216 2011-06-12T11:40:14 Remove custom backends All the custom backend code will be moved to a separate project, together with the new MySQL backend.
Carlos Martín Nieto a98b0d80 2011-06-14T14:26:08 Test replacing a value Add a test to check that value replacement works. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
nulltoken 95818ff7 2011-06-08T22:15:49 Fix filebuf0 test which was failing on Windows
nulltoken 9e3aa947 2011-06-08T20:39:38 Fix compilation warnings in MSVC
Brian Lopez a51201cc 2011-06-11T22:05:26 use proper in-memory database for sqlite3 tests
Carlos Martín Nieto 8102a961 2011-06-07T16:51:31 Add test for git_filebuf_open error code Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Vicent Marti 9d77d83a 2011-06-07T03:38:09 Revert "threads: Fix TLS declarations" This commit uploaded an old broken test. Oops!
Vicent Martí 2c9e7fa3 2011-06-06T18:24:37 Merge pull request #232 from schu/ref-available-cb reference_rename: respect all references v2
Vicent Marti 64fe8c62 2011-06-07T03:22:32 threads: Fix TLS declarations Cleanup the thread-utils file. Do not define TLS if libgit2 is not threadsafe.
Vicent Martí 7d170a4b 2011-06-06T18:11:15 Merge pull request #231 from Romain-Geissler/discovery-path-v2 [Discovery path] Fix and tests
Romain Geissler efcc87c9 2011-06-06T10:02:07 Repository: A little fix in error code. GIT_ENOTFOUND is returned when a gitfile is malformed and GIT_ENOTAREPO when the pointed dir is not a repo. Fixed tests so that it check the right error code.
schu fd21c6f6 2011-05-29T22:36:26 Add test case checking we do not corrupt the repository when renaming Signed-off-by: schu <schu-github@schulog.org>
Romain Geissler 76e9e3b7 2011-06-05T00:23:24 Tests: Added tests for git_repository_discover. Unfortunately, the across_fs flag can't be tested automaticly, as we can't create a temporary new filesystem.
Vicent Marti 602ee38b 2011-06-04T20:44:14 repository: Export all internal paths
unknown 26a98ec8 2011-06-03T20:47:56 Fileops: Added a fourth argument to the path prettifying functions to use an alternate basepath. Fixed a Windows TO-DO in the prettifying functions.
Vicent Martí dd8a2070 2011-06-01T12:54:15 Merge pull request #215 from schu/typos Fix typos
Vicent Martí 46d359d1 2011-06-01T12:53:46 Merge pull request #218 from schu/tests-fflush test_lib.c: flush stdout after every test-run
Vicent Martí 9db04160 2011-06-01T12:52:50 Merge pull request #222 from carlosmn/config-bugfix Config bugfix
Vicent Martí 50b7334e 2011-06-01T09:58:21 Merge pull request #206 from nulltoken/topic/is-bare Add git_repository_is_bare() accessor
Vicent Marti f7e59c4d 2011-06-01T18:34:21 index: Change the memory management for repo indexes The `git_repository_index` call now returns a brand new index that must be manually free'd.
Carlos Martín Nieto fc0ee5bd 2011-05-31T17:54:50 Add test for empty config file Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto 30d0550d 2011-05-31T16:31:19 Add test for invalid ext header Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto 38d0bc1e 2011-05-31T16:06:01 Add config test for empty line Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
schu a7ed1625 2011-05-30T21:13:11 test_lib.c: flush stdout after every test-run Make sure the user immediately sees the feedback, '.' or 'F', for a test. If it's only in the buffer, it may gets "lost" in case of error. Signed-off-by: schu <schu-github@schulog.org>
schu 286349c6 2011-05-29T20:15:27 Fix tiny typo Signed-off-by: nulltoken <emeric.fermas@gmail.com> Signed-off-by: schu <schu-github@schulog.org>
nulltoken fa9bcd81 2011-05-24T21:48:07 Add git_repository_is_bare() accessor
Vicent Marti b0b527e0 2011-05-20T03:20:12 config: Cleanup & renaming of the external API "git_config_backend" have been renamed to "git_config_file", which implements a generic interface to access a configuration file -- be it either on disk, from a DB or whatever mumbojumbo. I think this makes more sense.
schu 6628c256 2011-05-18T12:35:57 test_lib: add return value to git_test Save the return value of functions not passing must_pass() and report the returned error. Signed-off-by: schu <schu-github@schulog.org>
Vicent Marti c9662061 2011-05-17T15:12:25 t15: Remove unused variable
Vicent Marti 124fbb3d 2011-05-17T15:11:43 tests: Update NAMING file
Vicent Martí 62845c90 2011-05-17T05:11:06 Merge pull request #116 from carlosmn/test-naming tests: update NAMING file
Carlos Martín Nieto 94711cad 2011-05-17T12:12:59 Merge upstream/development
Carlos Martín Nieto c0335005 2011-05-06T12:42:47 Move config to a backend structure Configuration options can come from different sources. Currently, there is only support for reading them from a flat file, but it might make sense to read it from a database at some point. Move the parsing code into src/config_file.c and create an include file include/git2/config_backend.h to allow for other backends to be developed. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto ca8d2dfc 2011-05-05T16:22:06 Merge remote-tracking branch 'upstream/development' into config
Carlos Martín Nieto bbd68c67 2011-05-05T11:38:23 ref test: update a forgotten repo -> repo2 Commit 34e5d87e0512f2a3dfd6 left one of these unchanged we're trying to read from a free'd repository. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Vicent Martí cc3b82e3 2011-05-02T15:29:50 Merge pull request #151 from carlosmn/root-commit. Support root commits
Vicent Martí fde97669 2011-05-02T15:26:16 Merge pull request #146 from nordsturm/fix_subtrees. Fix tree-entry attribute convertion (fix corrupted trees)
Vicent Martí d4ad0771 2011-05-01T14:59:50 Merge pull request #145 from schu/fix-unused-warnings. Fix -Wunused-but-set-variable warnings
nulltoken 34e5d87e 2011-05-01T21:35:32 Change implementation of refs tests that alter the current repository to make them run against a temporary clone of the test repository
Carlos Martín Nieto 79b61557 2011-04-28T18:30:50 Add root commit test Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Sergey Nikishin 555ce568 2011-04-26T13:22:45 Fix tree-entry attribute convertion (fix corrupted trees) Magic constant replaced by direct to-string covertion because of: 1) with value length 6 (040000 - subtree) final tree will be corrupted; 2) for wrong values length <6 final tree will be corrupted too.
schu 402a47a7 2011-04-26T11:29:05 Fix -Wunused-but-set-variable warnings As of gcc 4.6 -Wall includes -Wunused-but-set-variable. Use GIT_UNUSED or remove actually unused variables to prevent those warnings.
Vicent Martí 5a74d160 2011-04-23T14:37:56 Merged pull request #135 from carlosmn/valgrind. Fix memory leaks in the tests
Carlos Martín Nieto a99264bf 2011-04-19T16:34:22 config: allow uppercase number suffixes Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto 7c1c15a7 2011-04-13T21:55:43 tests: free the test suite name Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto 2fe3692c 2011-04-13T17:44:08 tests: don't leak objects If we don't create any leaks in the tests, we can use them to search for leaks in the implementation. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Vicent Marti def3fef1 2011-04-12T15:52:34 Add `git_tag_list` Lists all the tag references in a repository using a custom callback. Includes unit tests courtesy of Emeric Fermas <3
Carlos Martín Nieto 53345e1f 2011-04-11T18:01:01 config: add tests for number suffix Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto 55c197cd 2011-04-11T17:41:21 Merge upstream/development
Vicent Marti fdd0cc9e 2011-04-10T15:25:41 Fix path normalization tests They were backtracking too deep into the filesystem on Linux, where the tests were running directly on `tmp/`.
Vicent Marti a6359408 2011-04-10T12:23:55 Use Z_BEST_SPEED for filebuf deflating This is what Git uses by default for all deflating.
nulltoken 4a34b3a9 2011-04-09T15:49:44 Add two new accessors to the repository git_repository_path() and git_repository_workdir() respectively return the path to the git repository and the working directory. Those paths are absolute and normalized.
Vicent Marti b918ae40 2011-04-08T15:35:25 Do not declare variables in the middle of a func
Vicent Marti 41233c40 2011-04-08T12:42:18 Add new method `git_repository_is_empty`
Vicent Marti cef75d74 2011-04-08T12:41:17 Remove unused variables from test files
Vicent Marti d79f1da6 2011-04-08T12:14:33 refs: Fix issue when packing weak tags Weak tags (e.g. tags that point directly to a normal object instead of a tag object) were failing to be packed.
Carlos Martín Nieto 7bc66a79 2011-04-06T10:58:14 tag: don't allow tags to non-existent objects These indicate an inconsistency in the repository which we've created, so don't allow them. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Shuhei Tanuma 98ac6780 2011-04-06T02:22:24 fix git_treebuilder_insert probrem. couldn't add new entry when inserting new one with `git_treebuilder_insert`.
Dmitry Kovega 8a64bc29 2011-04-03T21:43:51 redis backend
Carlos Martín Nieto 8bd6c0ab 2011-04-06T15:49:29 Merge remote-tracking branch 'upstream/development' into config
Vicent Marti 0ad6efa1 2011-04-04T19:24:19 Build & write custom trees in memory
Carlos Martín Nieto 511b2370 2011-04-04T17:24:37 tests: update NAMING file Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto 8cd767ef 2011-04-04T17:07:47 config: test for a variable on its own If a variable is on its own, truth should be assumed. Check this is true in our code. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto 0bf8ca88 2011-04-04T16:44:23 config: add tests These tests are basic, but they should tell us when we've broken something. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
nulltoken f3564e1e 2011-04-03T13:50:09 Fix tag reference name in testrepo.git The git test repository was holding a wrongly named tag reference ("very-simple") pointing at a tag named "e90810b". This mistake (mine :-/ ) originates back to https://github.com/libgit2/libgit2/commit/9282e92 Whole credit goes to @tclem for having spotted this.
Vicent Marti 3e3e4631 2011-04-02T12:49:14 Merge branch 'tagging' of https://github.com/nulltoken/libgit2 into development Conflicts: include/git2/tag.h src/tag.c
Vicent Marti 720d5472 2011-04-02T12:42:04 Change `parse` methods to const buffer Signed-off-by: Vicent Marti <tanoku@gmail.com>