tests-clar


Log

Author Commit Date CI Message
Russell Belfer caf71ec0 2012-02-07T15:30:18 Add tests and fix bugs for diff whitespace options Once I added tests for the whitespace handling options of diff, I realized that there were some bugs. This fixes those and adds the new tests into the test suite.
Russell Belfer a2e895be 2012-02-07T12:14:28 Continue implementation of git-diff * Implemented git_diff_index_to_tree * Reworked git_diff_options structure to handle more options * Made most of the options in git_diff_options actually work * Reorganized code a bit to remove some redundancy * Added option parsing to examples/diff.c to test most options
Russell Belfer 3a437590 2012-02-03T16:53:01 Clean up diff implementation for review This fixes several bugs, updates tests and docs, eliminates the FILE* assumption in favor of printing callbacks for the diff patch formatter helpers, and adds a "diff" example function that can perform a diff from the command line.
Russell Belfer 2705576b 2012-01-24T14:06:42 Simplify GIT_UNUSED macros Since casting to void works to eliminate errors with unused parameters on all platforms, avoid the various special cases. Over time, it will make sense to eliminate the GIT_UNUSED macro completely and just have GIT_UNUSED_ARG.
Russell Belfer 7e3fc623 2012-01-23T10:54:49 Add test for possible attr bug This is a test that should replicate an issue that Peff is setting with git attributes. But the test doesn't fail.
Vicent Martí e3d55b2a 2012-03-02T15:44:15 Merge pull request #575 from libgit2/filters Filters, yo
Russell Belfer ce49c7a8 2012-03-02T15:09:40 Add filter tests and fix some bugs This adds some initial unit tests for file filtering and fixes some simple bugs in filter application.
Vicent Martí d377fe80 2012-03-02T22:12:46 attr: Add missing header to test suite
Vicent Martí c63793ee 2012-03-02T03:51:45 attr: Change the attribute check macros The point of having `GIT_ATTR_TRUE` and `GIT_ATTR_FALSE` macros is to be able to change the way that true and false values are stored inside of the returned gitattributes value pointer. However, if these macros are implemented as a simple rename for the `git_attr__true` pointer, they will always be used with the `==` operator, and hence we cannot really change the implementation to any other way that doesn't imply using special pointer values and comparing them! We need to do the same thing that core Git does, which is using a function macro. With `GIT_ATTR_TRUE(attr)`, we can change internally the way that these values are stored to anything we want. This commit does that, and rewrites a large chunk of the attributes test suite to remove duplicated code for expected attributes, and to properly test the function macro behavior instead of comparing pointers.
Carlos Martín Nieto a4a910dd 2012-02-27T22:46:45 Simple test for pushing HEAD and hiding a branch
Carlos Martín Nieto f7367993 2012-02-27T22:22:45 revwalk: add convenience function to push/hide HEAD It's not unusual to want the walker to act on HEAD, so add a convencience function for the case that the user doesn't already have a resolved HEAD reference.
Carlos Martín Nieto f0fa1c1a 2012-02-27T22:00:49 Add revwalk glob test
Carlos Martín Nieto 8f7be6ca 2012-02-27T21:30:22 Move revwalk test to clar
Vicent Martí 13224ea4 2012-02-27T04:28:31 buffer: Unify `git_fbuffer` and `git_buf` This makes so much sense that I can't believe it hasn't been done before. Kill the old `git_fbuffer` and read files straight into `git_buf` objects. Also: In order to fully support 4GB files in 32-bit systems, the `git_buf` implementation has been changed from using `ssize_t` for storage and storing negative values on allocation failure, to using `size_t` and changing the buffer pointer to a magical pointer on allocation failure. Hopefully this won't break anything.
Carlos Martín Nieto 8171998f 2012-02-26T19:15:36 Add git_remote_list() Loops through the configuration and generates a list of configured remotes.
Carlos Martín Nieto 6b63589e 2012-02-25T19:00:58 config: add more comprehensive multivar tests
Carlos Martín Nieto 9554cd51 2012-02-24T12:14:26 A remote exists with an URL alone We used to consider it an error if a remote didn't have at least a fetch refspec. This was too much checking, as a remote doesn't in fact need to have anything other than an URL configured to be considered a remote.
schu aa4254d9 2012-02-23T23:27:29 tests-clar/notes: init oid before using Reported-by: Carlos Martín Nieto <carlos@cmartin.tk> Signed-off-by: schu <schu-github@schulog.org>
Russell Belfer f01fa266 2012-02-23T11:17:48 Fix workdir iterator unit tests This test is fragile if you leave extra files in the test data directory, such as a foo.c~ file from editing with Emacs. Who would do such a thing?
Vicent Martí 36d72a51 2012-02-22T16:06:33 Merge pull request #570 from arrbee/uniform-iterators Uniform iterators for trees, index, and workdir
Russell Belfer da337c80 2012-02-22T11:22:33 Iterator improvements from diff implementation This makes two changes to iterator behavior: first, advance can optionally do the work of returning the new current value. This is such a common pattern that it really cleans up usage. Second, for workdir iterators, this removes automatically iterating into directories. That seemed like a good idea, but when an entirely new directory hierarchy is introduced into the workdir, there is no reason to iterate into it if there are no corresponding entries in the tree/index that it is being compared to. This second change actually wasn't a lot of code because not descending into directories was already the behavior for ignored directories. This just extends that to all directories.
Vicent Martí 8d36b253 2012-02-22T11:12:20 Merge pull request #565 from carlosmn/multimap Add config multivar support
Russell Belfer b6c93aef 2012-02-21T14:46:24 Uniform iterators for trees, index, and workdir This create a new git_iterator type of object that provides a uniform interface for iterating over the index, an arbitrary tree, or the working directory of a repository. As part of this, git ignore support was extended to support push and pop of directory-based ignore files as the working directory is being traversed (so the array of ignores does not have to be recreated at each directory during traveral). There are a number of other small utility functions in buffer, path, vector, and fileops that are included in this patch that made the iterator implementation cleaner.
Carlos Martín Nieto 89e5ed98 2012-02-20T19:04:45 Add git_remote_save()
Carlos Martín Nieto bcb8c007 2012-02-20T18:37:07 Add git_remote_set_{fetch,push}spec() Allow setting the fetch and push refspecs, which is useful for creating new refspecs.
Carlos Martín Nieto 3005855f 2012-02-05T00:29:26 Implement setting multivars
Carlos Martín Nieto 5e0dc4af 2012-02-04T23:18:30 Support getting multivars
Carlos Martín Nieto 78d65f39 2012-02-01T17:47:17 tests: add multivar read test
schu bf477ed4 2012-02-15T00:33:38 Add git notes API This commit adds basic git notes support to libgit2, namely: * git_note_read * git_note_message * git_note_oid * git_note_create * git_note_remove In the long run, we probably want to provide some convenience callback mechanism for merging and moving (filter-branch) notes. Signed-off-by: schu <schu-github@schulog.org>
schu b4b79ac3 2012-02-15T00:12:53 commit: actually allow yet to be born update_ref git_commit_create is supposed to update the given reference "update_ref", but segfaulted in case of a yet to be born reference. Fix it. Signed-off-by: schu <schu-github@schulog.org>
schu 90e6c620 2012-02-13T12:13:05 tests-clar: fix warning sign-compare Signed-off-by: schu <schu-github@schulog.org>
nulltoken 99abb79d 2012-02-03T12:45:43 repository: ensure that the path to the .git directory ends with a forward slash when opening a repository through a working directory path This fixes an issue which was detected while using one of the libgit2 bindings [0]. The lack of the trailing forward slash led the name of references returned by git_reference_listall() to be prefixed with a forward slash. [0]: https://github.com/libgit2/libgit2sharp/pull/108
Russell Belfer e8c96ed2 2012-02-01T12:30:35 Add unit tests for recent bug fixes Add unit tests to confirm ignore directory pattern matches and to confirm that ignore and attribute files are loaded properly into the attribute file cache.
Vicent Martí bf0107d1 2012-02-01T17:35:11 Merge remote-tracking branch 'arrbee/status-bugs' into development
Carlos Martín Nieto 771cde43 2012-02-01T04:40:18 tests: free the remotes temp buffer
Russell Belfer adc9bdb3 2012-01-31T13:59:32 Fix attr path is_dir check When building an attr path object, the code that checks if the file is a directory was evaluating the file as a relative path to the current working directory, instead of using the repo root. This lead to inconsistent behavior.
Carlos Martín Nieto 279afd2a 2012-01-31T17:21:49 refspec: a ref name includes the refs/ prefix git_refspec_transform_r assumed that the reference name passed would be only a branch or tag name. This is not the case, and we need to take into consideration what's in the refspec's source to know how much of the prefix to ignore.
Vicent Martí f25cc58d 2012-01-27T18:29:03 clar: Remove pregenerated files Those were re-added on the move. Ops!
nulltoken 5663e61a 2012-01-25T16:44:21 repository: add minimal reinitialization of repository This currently only ensures that the version of the repository format isn't greater than zero.
nulltoken 9b84447a 2012-01-25T12:35:25 clay: migrate a test initializing a repository which path escapes the current working directory A non migrated yet test has been removed as well as it's mostly redundant.
Vicent Martí 3fd1520c 2012-01-24T20:35:15 Rename the Clay test suite to Clar Clay is the name of a programming language on the makings, and we want to avoid confusions. Sorry for the huge diff!