summaryrefslogtreecommitdiff
path: root/tests/resources
Commit message (Collapse)AuthorAgeFilesLines
...
* Add PHP tests and fix bug in PHP builtin driverRussell Belfer2014-01-2713-3/+204
|
* Update Javascript userdiff driver and testsRussell Belfer2014-01-2723-5/+410
| | | | | | | | | Writing a sample Javascript driver pointed out some extra whitespace handling that needed to be done in the diff driver. This adds some tests with some sample javascript code that I pulled off of GitHub just to see what would happen. Also, to clean up the userdiff test data, I did a "git gc" and packed up the test objects.
* Move userdiff tests to be data drivenRussell Belfer2014-01-2421-0/+189
| | | | | | This moves the expected and actual test data along with the source data for the userdiff tests into the tests/resources/userdiff test repo and updates the test to use that.
* Preserve tree filemode in index during checkoutEdward Thomson2014-01-223-0/+0
| | | | | | Don't try to determine whether the system supports file modes when putting the tree data in the index during checkout. The tree's mode is canonical and did not come from stat(2) in the first place.
* Merge submodulesEdward Thomson2014-01-2045-0/+44
|
* Don't try to merge binary filesEdward Thomson2014-01-209-0/+3
|
* merge_file should use more aggressive levelsEdward Thomson2014-01-2023-1/+9
| | | | | | | | | | | The default merge_file level was XDL_MERGE_MINIMAL, which will produce conflicts where there should not be in the case where both sides were changed identically. Change the defaults to be more aggressive (XDL_MERGE_ZEALOUS) which will more aggressively compress non-conflicts. This matches git.git's defaults. Increase testing around reverting a previously reverted commit to illustrate this problem.
* Handle git_buf's from users more liberallyEdward Thomson2014-01-084-1/+1
|
* Introduce git_revert to revert a single commitEdward Thomson2013-12-0245-0/+91
|
* tree-cache: Don't segfault upon corruptionnulltoken2013-11-191-0/+0
|
* Rename tests-clar to testsBen Straub2013-11-141794-0/+2854
|
* Backport more test dataVicent Martí2012-05-0266-57/+0
|
* Move test resourcesVicent Martí2012-05-0298-130/+0
|
* Merge branch 'new-error-handling' into developmentVicent Martí2012-05-02111-0/+144
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .travis.yml include/git2/diff.h src/config_file.c src/diff.c src/diff_output.c src/mwindow.c src/path.c tests-clar/clar_helpers.c tests-clar/object/tree/frompath.c tests/t00-core.c tests/t03-objwrite.c tests/t08-tag.c tests/t10-refs.c tests/t12-repo.c tests/t18-status.c tests/test_helpers.c tests/test_main.c
| * Include the new config test fileCarlos Martín Nieto2012-04-251-0/+2
| |
| * config: parse quoted valuesCarlos Martín Nieto2012-04-161-0/+7
| | | | | | | | | | Variable values may be quoted to include newlines, literal quotes and other characters. Add support for these and test it.
| * tag: Add git_tag_peel() which recursively peel a tag until a non tag ↵nulltoken2012-04-102-0/+1
| | | | | | | | git_object is met
| * Fix handling of submodules in treesRussell Belfer2012-03-266-0/+6
| |
| * Fix error in tree iterator when popping up treesRussell Belfer2012-03-2513-1/+9
| | | | | | | | | | | | | | | | | | | | There was an error in the tree iterator where it would delete two tree levels instead of just one when popping up a tree level. Unfortunately the test data for the tree iterator did not have any deep trees with subtrees in the middle of the tree items, so this problem went unnoticed. This contains the 1-line fix plus new test data and tests that reveal the issue.
| * Adding new tests for new status commandRussell Belfer2012-03-2295-0/+124
| | | | | | | | | | | | | | | | This is a work in progress. This adds two new sets of tests, the issue_592 tests from @nulltoken's pull request #601 and some new tests for submodules. The submodule tests still have issues where the status is not reported correctly. That needs to be fixed before merge.
* | Merge pull request #606 from benstraub/t04_commit_to_clarVicent Martí2012-04-0253-0/+43
|\ \ | | | | | | Ported t04_commit.c to Clar.
| * | Ported t04_commit.c to Clar.Ben Straub2012-03-2053-0/+43
| |/ | | | | | | | | | | | | | | | | | | Created a copy of tests/resources/testrepo.git that is compatible with the Clar sandboxing helpers. Restructured commit test suites to use Clar sandbox helpers. Now using typed data arrays rather than lots of macros to define test cases.
* | Moved testing resources to clar, and removed old tests directory.Ben Straub2012-03-31267-471/+0
| | | | | | | | Removed the BUILD_CLAR CMake flag, and updated the readme.
* | t08_tag.c ported.Ben Straub2012-03-3053-0/+43
|/ | | | Also cleaned up some names for things that used to be macros.
* Add tests and fix bugs for diff whitespace optionsRussell Belfer2012-03-028-4/+15
| | | | | | 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.
* Clean up diff implementation for reviewRussell Belfer2012-03-021-0/+0
| | | | | | | 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.
* Initial implementation of git_diff_blobRussell Belfer2012-03-0215-3/+43
| | | | | | | | This gets the basic plumbing in place for git_diff_blob. There is a known issue where additional parameters like the number of lines of context to display on the diff are not working correctly (which leads one of the new unit tests to fail).
* Add test for possible attr bugRussell Belfer2012-03-022-0/+7
| | | | | This is a test that should replicate an issue that Peff is setting with git attributes. But the test doesn't fail.
* Implement setting multivarsCarlos Martín Nieto2012-02-171-2/+2
|
* tests: add multivar read testCarlos Martín Nieto2012-02-171-0/+3
|
* Add unit tests for recent bug fixesRussell Belfer2012-02-014-0/+1
| | | | | | 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.
* Fix handling of relative paths for attrsRussell Belfer2012-01-1613-2/+13
| | | | | | | | | | | | Per issue #533, the handling of relative paths in attribute and ignore files was not right. Fixed this by pre-joining the relative path of the attribute/ignore file onto the match string when a full path match is required. Unfortunately, fixing this required a bit more code than I would have liked because I had to juggle things around so that the fnmatch parser would have sufficient information to prepend the relative path when it was needed.
* Allow ignores (and attribs) for nonexistent filesRussell Belfer2012-01-111-0/+1
| | | | | | This fixes issue 532 that attributes (and gitignores) could not be checked for files that don't exist. It should be possible to query such things regardless of the existence of the file.
* Initial implementation of gitignore supportRussell Belfer2012-01-112-0/+3
| | | | | | | | Adds support for .gitignore files to git_status_foreach() and git_status_file(). This includes refactoring the gitattributes code to share logic where possible. The GIT_STATUS_IGNORED flag will now be passed in for files that are ignored (provided they are not already in the index or the head of repo).
* Improved gitattributes macro implementationRussell Belfer2011-12-3010-1/+26
| | | | | | | | | | | | | This updates to implementation of gitattribute macros to be much more similar to core git (albeit not 100%) and to handle expansion of macros within macros, etc. It also cleans up the refcounting usage with macros to be much cleaner. Also, this adds a new vector function `git_vector_insert_sorted()` which allows you to maintain a sorted list as you go. In order to write that function, this changes the function `git__bsearch()` to take a somewhat different set of parameters, although the core functionality is still the same.
* Add support for macros and cache flush API.Russell Belfer2011-12-2919-7/+55
| | | | | | | | | | | | | | Add support for git attribute macro definitions. Also, add support for cache flush API to clear the attribute file content cache when needed. Additionally, improved the handling of global and system files, making common utility functions in fileops and converting config and attr to both use the common functions. Adds a bunch more tests and fixed some memory leaks. Note that adding macros required me to use refcounted attribute assignment definitions, which complicated, but probably improved memory usage.
* Add APIs for git attributesRussell Belfer2011-12-2036-0/+92
| | | | | | | | | This adds APIs for querying git attributes. In addition to the new API in include/git2/attr.h, most of the action is in src/attr_file.[hc] which contains utilities for dealing with a single attributes file, and src/attr.[hc] which contains the implementation of the APIs that merge all applicable attributes files.
* tests: Add `refs` folder to the `bad_tag.git` repoVicent Marti2011-11-261-0/+0
|
* status: Add a file in the test repository to cover the correct sorting of ↵nulltoken2011-10-2910-3/+9
| | | | | | entries when the working folder is being read In this case, "subdir.txt" should be listed before the "subdir" directory.
* Add test commit containing subtrees and filesnulltoken2011-10-1311-0/+2
|
* tag: avoid a double-free when parsing tags without a tagger fieldBrodie Rao2011-10-125-0/+9
| | | | | | | | | | | | | | | | | | | | The v0.99 tag in the Git repo triggers this behavior: http://git.kernel.org/?p=git/git.git;a=tag;h=d6602ec5194c87b0fc87103ca4d67251c76f233a Ideally, we'd allow the tag to be instantiated even though the tagger field is missing, but this at the very least prevents libgit2 from crashing. To test this bug, a new repository has been added based on the test branch in testrepo.git. It contains a "e90810b" tag that looks like this: object e90810b8df3e80c413d903f631643c716887138d type commit tag e90810b This is a very simple tag.
* commit: properly parse empty commit messagesBrodie Rao2011-10-124-1/+5
| | | | | | | | | This ensures commit->message is always non-NULL, even if the commit message is empty or consists of only a newline. One such commit can be found in the wild in the jQuery repository: https://github.com/jquery/jquery/commit/25b424134f9927a5bf0bab5cba836a0aa6c3cfc1
* config: behave like git with [section.subsection]Carlos Martín Nieto2011-10-011-0/+5
| | | | | | | | The documentation is a bit misleading. The subsection name is always case-sensitive, but with a [section.subsection] header, the subsection is transformed to lowercase when the configuration is parsed. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* config: make git_config_[get|set]_long() able to properly deal with 8 bytes ↵nulltoken2011-09-221-0/+1
| | | | | | | | wide values Should fix issue #419. Signed-off-by: nulltoken <emeric.fermas@gmail.com>
* Mark the resources in the test folder as binary to prevent unexpected ↵nulltoken2011-09-151-0/+1
| | | | line-feed conversion
* status: add subdir to test repoJason Penny2011-07-0915-2/+9
|
* status: new test repoJason Penny2011-07-0935-1/+33
|
* status: get blob object id of file on diskJason Penny2011-07-091-0/+1
| | | | | | Add git_status_hashfile() to get blob's object id for a file without adding it to the object database or needing a repository at all. This functionality is similar to `git hash-object` without '-w'.
* Merge pull request #300 from carlosmn/gsoc2011/masterVicent Martí2011-07-051-0/+3
|\ | | | | A bit of networking
| * Add a test for remote parsingCarlos Martín Nieto2011-06-261-0/+3
| | | | | | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>