tests/t10-refs.c


Log

Author Commit Date CI Message
schu b4ec3c64 2011-09-19T22:19:59 refs: add additional test for reference renaming Signed-off-by: nulltoken <emeric.fermas@gmail.com> Signed-off-by: schu <schu-github@schulog.org>
schu e7be57a9 2011-08-15T18:56:27 reflog: assimilate reflog API to return git_oid's Rather than returning the OIDs out of the reflog as string return them as git_oid. Signed-off-by: schu <schu-github@schulog.org>
schu 63396a39 2011-08-03T15:57:33 signature: adjust API to return error codes git_signature_new() and git_signature_now() currently don't return error codes. Change the API to return error codes and not pointers to let the user handle errors properly. Signed-off-by: schu <schu-github@schulog.org>
schu eed2714b 2011-08-01T17:00:31 reflog: avoid users writing a wrong ancestor OID Disallow NULL as ancestor OID when writing a reflog entry for an existing reference. Signed-off-by: schu <schu-github@schulog.org>
Carlos Martín Nieto cd0fe1ac 2011-07-12T20:46:07 Free sig in reflog test Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
nulltoken 7757be33 2011-07-10T07:48:52 reflog: Fix reflog writer/reader - Use a space to separate oids and signature - Enforce test coverage - Make test run in a temporary folder in order not to alter the test repository
schu 27df4275 2011-06-28T14:13:12 reflog: add API to read or write a reference log So far libgit2 didn't support reference logs (reflog). Add a new git_reflog_* API for basic reading and writing of reflogs: * git_reflog_read * git_reflog_write * git_reflog_free Signed-off-by: schu <schu-github@schulog.org>
nulltoken 6d4f090d 2011-07-07T17:49:55 reference_renaming: add additional tests Add some more test checking forced reference renaming. Signed-off-by: nulltoken <emeric.fermas@gmail.com> Acked-by: schu <schu-github@schulog.org>
schu 0ffcf78a 2011-06-14T15:16:43 reference_rename: git compliant reference renaming So far libgit2 didn't handle the following scenarios: * Rename of reference m -> m/m * Rename of reference n/n -> n Fixed. Since we don't write reflogs, we have to delete any old reflog for the renamed reference. Otherwise git.git will possibly fail when it finds invalid logs. Reported-by: nulltoken <emeric.fermas@gmail.com> Signed-off-by: schu <schu-github@schulog.org>
schu a6e0f315 2011-05-29T16:46:24 Add test case checking renaming of a branch to a new name prefixed with the old name succeeds, e.g. refs/heads/foo -> refs/heads/foo/bar Reported-by: nulltoken <emeric.fermas@gmail.com> Signed-off-by: schu <schu-github@schulog.org>
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>
Vicent Marti 7376ad99 2011-06-29T11:01:35 refs: Remove duplicate rename method `git_reference_rename` now takes a `force` flag
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.
Vicent Marti 3101a3e5 2011-06-23T02:28:29 refs: Do not overflow when normalizing refnames
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 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.
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>
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>
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>
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 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 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.
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.
nulltoken 2b9b99b6 2011-03-29T21:29:30 Add test ensuring one can not create an oid reference which targets at an unknown id
nulltoken 4d00dfd4 2011-03-29T21:21:47 Replace gitfo_unlink() calls with git_reference_delete() in refs related tests
Carlos Martín Nieto fc1eeb9d 2011-03-29T11:30:09 Make overwrite test more comprehensive Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto 553fbd64 2011-03-29T11:43:31 Check for looser reference names res/dummy/a and refs/stash must pass. The other rules are already tested by the rest of the checks. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Vicent Marti 95cde17c 2011-03-29T19:22:21 Enforce coding conventions in refs.c Internal methods are static and without the git prefix. 'Force' methods have a `_f` prefix to match the other 'force' methods.
Carlos Martín Nieto ec991936 2011-03-29T10:52:29 force-rename test: check for the right name Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto 591a9423 2011-03-28T18:40:58 Add tests covering overwriting references Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Vicent Marti b5abb881 2011-03-15T19:55:01 Do not segfault when listing unpacked references
Vicent Marti 7ad96e51 2011-03-15T05:38:50 Remove duplicate refs in `git_reference_listall`
Vicent Marti 00571828 2011-03-12T16:04:46 Add new method `git_reference_listall` Lists all the references in a repository. Listing may be filtered by reference type. This should applease Lord Clem.
Vicent Marti 5de079b8 2011-02-28T12:12:26 Change the object creation/lookup API The methods previously known as git_repository_lookup git_repository_newobject git_repository_lookup_ref are now part of their respective namespaces: git_object_lookup git_object_new git_reference_lookup This makes the API more consistent with the new references API. Signed-off-by: Vicent Marti <tanoku@gmail.com>
Vicent Marti 3dccfed1 2011-03-03T18:19:05 Cleanup the testing toolkit Tests are now declared with detailed descriptions and a short test name: BEGIN_TEST(the_test0, "this is an example test that does something") ... END_TEST Modules are declared through a simple macro interface: BEGIN_MODULE(mod_name) ADD_TEST(the_test0); ... END_MODULE Error messages when tests fail have been greatly improved. Signed-off-by: Vicent Marti <tanoku@gmail.com>
nulltoken d561403f 2011-03-03T19:57:12 Add test for corner case in reference renaming
nulltoken 268bee3d 2011-03-03T19:54:34 Add test renameref::rename_a_loose_reference()
nulltoken 8fc05096 2011-03-03T19:59:25 Add test deleteref::deleting_a_ref_which_is_both_packed_and_loose_should_remove_both_tracks_in_the_filesystem()
nulltoken 65cc1f44 2011-03-03T19:42:11 Add test renameref::can_not_rename_a_reference_with_an_invalid_name()
nulltoken 6b02b215 2011-03-03T19:43:47 Add test renameref::can_not_rename_a_reference_with_an_invalid_name()
nulltoken de05ff6c 2011-03-03T19:40:01 Add test renameref::renaming_a_packed_reference_makes_it_loose()
nulltoken 52b2c209 2011-03-03T19:37:40 Enhance the packrefs::create_packfile() test
nulltoken e4029c52 2011-02-28T12:33:47 Added copydir_recurs() to test_helpers.c Test helper function which recursively copies the content of a directory. This function has been tweaked to prevent stack overflows by reusing the same path buffers on all recursive calls.
nulltoken c38f9013 2011-02-26T13:56:57 Removed a duplicate constant.
Vicent Marti 87d3acf4 2011-02-27T22:31:43 Finish the References API The following methods have been implemented: git_reference_packall git_reference_rename git_reference_delete The library now has full support for packed references, including partial and total writing. Internal documentation has been updated with the details. Signed-off-by: Vicent Marti <tanoku@gmail.com>
nulltoken 2de3b35c 2011-02-14T22:32:02 Added test covering creation of nested symbolic references.
nulltoken 9b3985fa 2011-02-25T10:29:11 Slightly enhanced the readability of some reference related tests.
Vicent Marti 86194b24 2011-02-18T21:57:53 Split packed from unpacked references These two reference types are now stored separately to eventually allow the removal/renaming of loose references and rewriting of the refs packfile. Signed-off-by: Vicent Marti <tanoku@gmail.com>
nulltoken b0a83143 2011-02-25T10:06:49 Removed duplicate tests.
nulltoken 1d8cc731 2011-02-14T22:29:22 Refactored the reference creation API.
nulltoken 77600378 2011-02-13T14:51:45 Fixed line endings (CRLF->LF).
nulltoken e1be1028 2011-02-13T20:18:35 Added some more tests to ensure the correct behavior of git_reference__normalize_name().
nulltoken aa2120e9 2011-02-10T15:08:00 Added git_reference__normalize_name() along with tests.
Vicent Marti 995f9c34 2011-02-09T12:43:19 Use the new git__joinpath to build paths in methods The `git__joinpath` function has been changed to use a statically allocated buffer; we assume the buffer to be 4096 bytes, because fuck you. The new method also supports an arbritrary number of paths to join, which may come in handy in the future. Some methods which were manually joining paths with `strcpy` now use the new function, namely those in `index.c` and `refs.c`. Based on Emeric Fermas' original patch, which was using the old `git__joinpath` because I'm stupid. Thanks! Signed-off-by: Vicent Marti <tanoku@gmail.com>
nulltoken 1b7124f8 2011-02-07T17:37:54 Added tests exercising git_reference_write() to create a new symbolic reference and a new object id reference.
nulltoken 1af8c748 2011-02-05T15:24:08 Enforced refs handling tests. - Added a test to ensure that a nested symbolic reference is properly resolved. - Added comparisons of object ids.
Vicent Marti 2a1732b4 2011-02-02T02:15:25 Rewrite the unit testing suite NIH Enterprises presents: a new testing system based on CuTesT, which is faster than our previous one and fortunately uses no preprocessing on the source files, which means we can run that from CMake. The test suites have been gathered together into bigger files (one file per suite, testing each of the different submodules of the library). Signed-off-by: Vicent Marti <tanoku@gmail.com>