summaryrefslogtreecommitdiff
path: root/tests-clar/object
Commit message (Collapse)AuthorAgeFilesLines
* Fix memory leak in oid shortener testsRussell Belfer2013-05-291-53/+57
|
* Merge pull request #1595 from arrbee/even-more-rename-fixesVicent Martí2013-05-241-0/+37
|\ | | | | Even more rename detection fixes
| * Significant rename detection rewriteRussell Belfer2013-05-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This flips rename detection around so instead of creating a forward mapping from deltas to possible rename targets, instead it creates a reverse mapping, looking at possible targets and trying to find a source that they could have been renamed or copied from. This is important because each output can only have a single source, but a given source could map to multiple outputs (in the form of COPIED records). Additionally, this makes a couple of tweaks to the public rename detection APIs, mostly renaming a couple of options that control the behavior to make more sense and to be more like core Git. I walked through the tests looking at the exact results and updated the expectations based on what I saw. The new code is different from the old because it cannot give some nonsense results (like A was renamed to both B and C) which were part of the outputs previously.
| * Add git_oid_nfmt - a flexible OID formatterRussell Belfer2013-05-171-0/+38
| | | | | | | | | | | | I frequently want to the the first N digits of an OID formatted as a string and I'd like it to be efficient. This function makes that easy and I could rewrite the OID formatters in terms of it.
* | Add testcase for #1600Axel Wagner2013-05-231-0/+39
| |
* | tag: Introduce git_tag_annotation_create()nulltoken2013-05-211-0/+38
|/
* Fix win32 type warningsRussell Belfer2013-05-071-2/+2
|
* Merge pull request #1526 from arrbee/cleanup-error-return-without-msgVicent Martí2013-05-061-5/+0
|\ | | | | Make sure error messages are set for most error returns
| * Remove obsolete test for peel typeRussell Belfer2013-05-041-5/+0
| | | | | | | | | | Peeling to an invalid type is now checked via an assert so this test is no longer relevant.
* | Extra threading testsRussell Belfer2013-05-021-3/+55
|/ | | | | We need to hammer the packfile open phase harder in the thread tests, in addition to the cache API.
* cache: Max cache size, and evict when the cache fills upvmg/new-cacheVicent Marti2013-04-221-3/+3
|
* tests: Do not warn for unused variableVicent Marti2013-04-221-1/+4
|
* Make indexer use shared packfile open codeRussell Belfer2013-04-221-3/+3
| | | | | | | | | | | The indexer was creating a packfile object separately from the code in pack.c which was a problem since I put a call to git_mutex_init into just pack.c. This commit updates the pack function for creating a new pack object (i.e. git_packfile_check()) so that it can be used in both places and then makes indexer.c use the shared initialization routine. There are also a few minor formatting and warning message fixes.
* Add tests for oidmap and new cache with threadingRussell Belfer2013-04-221-0/+232
| | | | | | | | | This adds some basic tests for the oidmap just to make sure that collisions, etc. are dealt with correctly. This also adds some tests for the new caching that check if items are inserted (or not inserted) properly into the cache, and that the cache can hold up in a multithreaded environment without error.
* What has science done.Vicent Marti2013-04-221-1/+7
|
* Move odb_backend implementors stuff into git2/sysRussell Belfer2013-04-211-1/+2
| | | | | | | | | | | | This moves some of the odb_backend stuff that is related to the internals of an odb_backend implementation into include/git2/sys. Some of the stuff related to streaming I left in include/git2 because it seemed like it would be reasonably needed by a normal user who wanted to stream objects into and out of the ODB. Also, I added APIs for traversing the list of backends so that some of the tests would not need to access ODB internals.
* tag: Fix parsing when no tagger nor messagenulltoken2013-03-311-0/+23
|
* tests: Fix indentationsnulltoken2013-03-311-61/+61
|
* Move crlf conversion into buf_textautocrlf-fixesRussell Belfer2013-03-251-0/+1
| | | | | | | | | | | | | | This adds crlf/lf conversion functions into buf_text with more efficient implementations that bypass the high level buffer functions. They attempt to minimize the number of reallocations done and they directly write the buffer data as needed if they know that there is enough memory allocated to memcpy data. Tests are added for these new functions. The crlf.c code is updated to use the new functions. Removed the include of buf_text.h from filter.h and just include it more narrowly in the places that need it.
* immutable references and a pluggable ref databaseEdward Thomson2013-03-071-0/+1
|
* Revert "hash: remove git_hash_init from internal api"Michael Schubert2013-02-261-1/+1
| | | | | This reverts commit efe7fad6c96a3d6197a218aeaa561ec676794499, except for the indentation fixes.
* hash: remove git_hash_init from internal apiMichael Schubert2013-02-261-75/+75
| | | | Along with that, fix indentation in tests-clar/object/raw/hash.c
* Add more treebuilder testsRussell Belfer2013-02-201-0/+97
| | | | | | The recent changes with git_treebuilder_entrycount point out that the test coverage for git_treebuilder_remove and git_treebuilder_entrycount is completely absent. This adds tests.
* Seperate out a new test that verifies packed-refs with no trailing newlineScott J. Goldman2013-01-221-3/+0
| | | | as per @vmg's request
* Allow peeled references without trailing newline at end of fileScott J. Goldman2013-01-221-0/+4
| | | | Also ammends one of the tag tests to make sure it's working.
* add an index_remove_bypath that removes conflicts, renamed add_from_workdir ↵Edward Thomson2013-01-121-1/+1
| | | | to match
* Make git_oid_tostr use out buffer for NULL oidRussell Belfer2013-01-041-2/+2
| | | | | | Previously a NULL oid was handled like an empty buffer and returned a status empty string. This makes git_oid_tostr() set the output buffer to the empty string instead.
* tests: Fix unused temp repoVicent Marti2012-12-141-5/+0
|
* Clean up GCC build warningsBen Straub2012-12-101-2/+1
|
* tree: relax the filemode parserCarlos Martín Nieto2012-12-071-17/+22
| | | | | | | | | | | There are many different broken filemodes in the wild so we need to protect against them and give something useful up the chain. Don't fail when reading a tree from the ODB but normalize the mode as best we can. As 664 is no longer a mode that we consider to be valid and gets normalized to 644, we can stop accepting it in the treebuilder. The library won't expose it to the user, so any invalid modes are a bug.
* object: refine git_object_peel() error reportnulltoken2012-12-011-4/+9
|
* tag: Deploy EINVALIDSPEC usagenulltoken2012-12-011-1/+30
|
* Merge pull request #1110 from libgit2/features/push_rebasedVicent Martí2012-11-291-0/+1
|\ | | | | Push! By schu, phkelley, and congyiwu
| * Remove git_object_oid2typePhilip Kelley2012-11-291-11/+0
| |
| * Push! By schu, phkelley, and congyiwu, et alPhilip Kelley2012-11-281-0/+12
| |
* | Consolidate text buffer functionsRussell Belfer2012-11-281-13/+19
|/ | | | | | | | | | | | | There are many scattered functions that look into the contents of buffers to do various text manipulations (such as escaping or unescaping data, calculating text stats, guessing if content is binary, etc). This groups all those functions together into a new file and converts the code to use that. This has two enhancements to existing functionality. The old text stats function is significantly rewritten and the BOM detection code was extended (although largely we can't deal with anything other than a UTF8 BOM).
* Fix warnings on Win64 buildRussell Belfer2012-11-272-3/+3
|
* API updates for index.hBen Straub2012-11-271-1/+1
|
* API updates for tag.hRussell Belfer2012-11-271-1/+1
|
* API review / update for tree.hRussell Belfer2012-11-271-6/+6
|
* More external API cleanupVicent Marti2012-11-272-3/+3
| | | | | | Conflicts: src/branch.c tests-clar/refs/branches/create.c
* Rename ref and reflog apis for consistencyBen Straub2012-11-271-5/+5
|
* Reset all static variables to NULL in clar's __cleanupSascha Cunz2012-11-235-1/+13
| | | | | | | | | | | | Without this change, any failed assertion in the second (or a later) test inside a test suite has a chance of double deleting memory, resulting in a heap corruption. See #1096 for details. This leaves alone the test cases where we "just" use cl_git_sandbox_init() and cl_git_sandbox_cleanup(). These methods already take good care to not double delete a repository. Fixes #1096
* Prevent creating `..`, `.`, and `.git` with tree builderScott J. Goldman2012-11-181-0/+6
| | | | As per core git.
* tag: rename git_tag_type to git_tag_target_typenulltoken2012-11-171-1/+1
|
* Fix MSVC compilation warningsnulltoken2012-11-171-1/+1
|
* Merge pull request #1016 from arrbee/fix-checkout-dir-removalVicent Martí2012-11-131-2/+2
|\ | | | | Update checkout with new strategies & behavior
| * Extensions to rmdir and mkdir utilitiesRussell Belfer2012-11-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | * Rework GIT_DIRREMOVAL values to GIT_RMDIR flags, allowing combinations of flags * Add GIT_RMDIR_EMPTY_PARENTS flag to remove parent dirs that are left empty after removal * Add GIT_MKDIR_VERIFY_DIR to give an error if item is a file, not a dir (previously an EEXISTS error was ignored, even for files) and enable this flag for git_futils_mkpath2file call * Improve accuracy of error messages from git_futils_mkdir
* | Remove git_hash_ctx_new - callers now _ctx_init()Edward Thomson2012-11-131-8/+8
| |
* | Win32 CryptoAPI and CNG support for SHA1Edward Thomson2012-11-131-7/+7
| |