summaryrefslogtreecommitdiff
path: root/tests-clar/clar_libgit2.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix warnings and merge issues on Win64Russell Belfer2012-08-231-0/+2
|
* Make index add/append support core.filemode flagRussell Belfer2012-06-191-1/+1
| | | | | | | | | | | This fixes git_index_add and git_index_append to behave more like core git, preserving old filemode data in the index when adding and/or appending with core.filemode = false. This also has placeholder support for core.symlinks and core.ignorecase, but those flags are not implemented (well, symlinks has partial support for preserving mode information in the same way that git does, but it isn't tested).
* Fix filemode comparison in diffsRussell Belfer2012-06-081-0/+3
| | | | | | | | | | | | | | | File modes were both not being ignored properly on platforms where they should be ignored, nor be diffed consistently on platforms where they are supported. This change adds a number of diff and status filemode change tests. This also makes sure that filemode-only changes are included in the diff output when they occur and that filemode changes are ignored successfully when core.filemode is false. There is no code that automatically toggles core.filemode based on the capabilities of the current platform, so the user still needs to be careful in their .git/config file.
* Tests: wrap 'getenv' and friends for Win32 tests.Ben Straub2012-06-081-0/+4
|
* clar helper: don't dereference giterr_last() if it's NULLCarlos Martín Nieto2012-05-071-1/+1
| | | | It can cause segfaults if the call didn't set an error
* Remove old and unused error codesVicent Martí2012-05-021-3/+3
|
* Update clar and remove old helpersRussell Belfer2012-04-171-20/+0
| | | | | | This updates to the latest clar which includes the helpers `cl_assert_equal_s` and `cl_assert_equal_i`. Convert the code over to use those and remove the old libgit2-only helpers.
* Refactor git_repository_open with new optionsRussell Belfer2012-04-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new command `git_repository_open_ext` with extended options that control how searching for a repository will be done. The existing `git_repository_open` and `git_repository_discover` are reimplemented on top of it. We may want to change the default behavior of `git_repository_open` but this commit does not do that. Improve support for "gitdir" files where the work dir is separate from the repo and support for the "separate-git-dir" config. Also, add support for opening repos created with `git-new-workdir` script (although I have only confirmed that they can be opened, not that all functions work correctly). There are also a few minor changes that came up: - Fix `git_path_prettify` to allow in-place prettifying. - Fix `git_path_root` to support backslashes on Win32. This fix should help many repo open/discover scenarios - it is the one function called when opening before prettifying the path. - Tweak `git_config_get_string` to set the "out" pointer to NULL if the config value is not found. Allows some other cleanup. - Fix a couple places that should have been calling `git_repository_config__weakptr` and were not. - Fix `cl_git_sandbox_init` clar helper to support bare repos.
* Clean up GIT_UNUSED macros on all platformsRussell Belfer2012-03-021-0/+5
| | | | | | | | | | | | | | | | | | | It turns out that commit 31e9cfc4cbcaf1b38cdd3dbe3282a8f57e5366a5 did not fix the GIT_USUSED behavior on all platforms. This commit walks through and really cleans things up more thoroughly, getting rid of the unnecessary stuff. To remove the use of some GIT_UNUSED, I ended up adding a couple of new iterators for hashtables that allow you to iterator just over keys or just over values. In making this change, I found a bug in the clar tests (where we were doing *count++ but meant to do (*count)++ to increment the value). I fixed that but then found the test failing because it was not really using an empty repo. So, I took some of the code that I wrote for iterator testing and moved it to clar_helpers.c, then made use of that to make it easier to open fixtures on a per test basis even within a single test file.
* Update diff to use iteratorsRussell Belfer2012-03-021-1/+4
| | | | | | | | | | | | | This is a major reorganization of the diff code. This changes the diff functions to use the iterators for traversing the content. This allowed a lot of code to be simplified. Also, this moved the functions relating to outputting a diff into a new file (diff_output.c). This includes a number of other changes - adding utility functions, extending iterators, etc. plus more tests for the diff code. This also takes the example diff.c program much further in terms of emulating git-diff command line options.
* Add filter tests and fix some bugsRussell Belfer2012-03-021-0/+1
| | | | | This adds some initial unit tests for file filtering and fixes some simple bugs in filter application.
* Rename the Clay test suite to ClarVicent Martí2012-01-241-0/+57
Clay is the name of a programming language on the makings, and we want to avoid confusions. Sorry for the huge diff!