tests-clar


Log

Author Commit Date CI Message
nulltoken a12e069a 2013-08-30T16:31:52 odb: Honor the non refreshing capability of a backend
Vicent Martí dbecec37 2013-08-28T09:38:14 Merge pull request #1805 from libgit2/threading-packed-load Thread safety for the refdb_fs
Vicent Martí 1ef05e3f 2013-08-28T06:05:50 Merge pull request #1803 from libgit2/ntk/topic/even_more_lenient_remote_parsing Even more lenient remote parsing
Vicent Martí b8b22d77 2013-08-28T06:04:51 Merge pull request #1772 from libgit2/config-iter Configuration iterators redux
Edward Thomson 1ff3a094 2013-08-27T19:41:44 Improve win32 version check, no ipv6 tests on XP
nulltoken aec87f71 2013-08-27T19:14:18 remote: Make git_remote_list() detect pushurl
nulltoken 191adce8 2013-08-27T20:00:28 vector: Teach git_vector_uniq() to free while deduplicating
nulltoken c9ffa84b 2013-08-21T16:04:25 remote: Relax the parsing logic even more In order to be loaded, a remote needs to be configured with at least a `url` or a `pushurl`. ENOTFOUND will be returned when trying to git_remote_load() a remote with neither of these entries defined.
nulltoken ece24ef7 2013-08-21T13:37:21 remote: Don't parse missing urls as empty strings
Nikolai Vladimirov 504850cd 2013-08-25T15:59:50 refs: add git_reference_is_tag
Fraser Tweedale 9d85f007 2013-08-24T17:39:15 fix tests on FreeBSD 238b761 introduced a test for posix behaviour, but on FreeBSD some of the structs and constants used aren't defined in <arpa/inet.h>. Include the appropriate headers to get the tests working again on FreeBSD.
Russell Belfer 44d65531 2013-08-19T16:03:15 Fix comment
Russell Belfer b6ac07b5 2013-08-22T14:45:10 Trying to fix Win32 warnings
Russell Belfer 972bb689 2013-08-22T14:10:56 Add SRWLock implementation of rwlocks for Win32
Russell Belfer 8d9a85d4 2013-08-22T11:40:53 Convert sortedcache to use rwlock This is the first use we have of pthread_rwlock_t in libgit2. Hopefully it won't cause any serious portability problems.
Russell Belfer b37359aa 2013-08-21T16:50:03 Fix warnings when compiling without threads
Russell Belfer fe372740 2013-08-21T16:26:32 Rewrite refdb_fs using git_sortedcache object This adds thread safety to the refdb_fs by using the new git_sortedcache object and also by relaxing the handling of some filesystem errors where the fs may be changed out from under us. This also adds some new threading tests that hammer on the refdb.
Russell Belfer a4977169 2013-08-21T14:09:38 Add sortedcache APIs to lookup index and remove This adds two other APIs that I need to the sortedcache type.
Russell Belfer 0b7cdc02 2013-08-20T15:18:48 Add sorted cache data type This adds a convenient new data type for caching the contents of file in memory when each item in that file corresponds to a name and you need to both be able to lookup items by name and iterate over them in some sorted order. The new data type has locks in place to manage usage in a threaded environment.
Russell Belfer 0f0f5655 2013-08-19T10:42:48 Don't try to pack symbolic refs If there were symbolic refs among the loose refs then the code to create packed-refs would fail trying to parse the OID out of them (where Git just skips trying to pack them). This fixes it.
Edward Thomson c0b01b75 2013-08-19T18:46:26 Skip UTF-8 BOM in binary detection When a git_buf contains a UTF-8 BOM, the three bytes comprising that BOM are treated as unprintable characters. For a small git_buf, the three BOM characters overwhelm the printable characters. This is problematic when trying to check out a small file as the CR/LF filtering will not apply.
Edward Thomson 238b7614 2013-08-16T13:31:24 Fix p_inet_pton on windows p_inet_pton on Windows should set errno properly for callers. Rewrite p_inet_pton to handle error cases correctly and add test cases to exercise this function.
Vicent Martí 520287f6 2013-08-19T02:17:00 Merge pull request #1785 from libgit2/cmn/odb-hash-frontend odb: move hashing to the frontend for streaming
Carlos Martín Nieto 3d276874 2013-08-19T10:30:44 index: report when it's locked Report the index being locked with its own error code in order to be able to differentiate, as a locked index is typically the result of a crashed process or concurrent access, both of which often require user intervention to fix.
Vicent Martí 51a5e133 2013-08-16T16:22:37 Merge pull request #1778 from libgit2/push_tag_to_tag_test push: handle tag chains correctly
Russell Belfer 0ea41445 2013-08-16T15:03:15 Improve isolation of new test from user environs
Russell Belfer 579d87c5 2013-08-16T14:48:14 New test that inits repo and make commit
Carlos Martín Nieto 376e6c9f 2013-08-15T13:48:35 odb: wrap the stream reading and writing functions This is in preparation for moving the hashing to the frontend, which requires us to handle the incoming data before passing it to the backend's stream.
Vicent Martí 9d1751bf 2013-08-14T06:44:28 Merge pull request #1783 from libgit2/cmn/relax-remote remote: relax the url rules
Carlos Martín Nieto 0b9ebb54 2013-08-14T11:18:05 remote: relax the url rules Accept any value for the remote's url, including an empty string which we used to reject as invalid configuration. This is not quite what git does (although it has its own problems with such configurations) and it makes it harder to fix the issue, by not letting the user modify it. As we already need to check for a valid URL when we try to connect to the network, let that perform the check, as we don't need to do it anywhere else.
Carlos Martín Nieto 5be622fb 2013-08-11T01:37:44 Test SSH in travis Set up the ssh credentials so we are able to talk to localhost and issue git commands. Move to use a script, as the command list is getting somewhat long. While here, delay installing valgrind until we need it, as it and its dependencies are by far the largest downloads and this allows us to start compiling (and failing) faster and we only incur this cost when the test suite runs successfully.
Carlos Martín Nieto f4be8209 2013-08-14T00:45:05 config: don't special-case the multivar iterator Build it on top of the normal iterator instead, which lets use re-use a lot of code.
Vicent Martí 40948998 2013-08-13T11:36:24 Merge pull request #1767 from libgit2/win32-bigger-utf8-buffer Bigger buffer for utf-8 parsing in win32
Russell Belfer ee065601 2013-08-13T09:53:56 Minor win32 fixes and improvements This is just a bunch of small fixes that I noticed while looking at the UTF8 and UTF16 path stuff. It fixes a slowdown in looking for an empty directory (not exiting loop asap), makes the dir name in the git__DIR structure be a GIT_FLEX_ARRAY to save an allocation, and fixes some slightly odd assumptions in the cl_getenv helper.
Russell Belfer d4cff0cb 2013-08-13T09:40:32 Rename git__win32_path fns to git_win32_path
Vicent Marti abf37327 2013-08-13T09:15:39 windows: Path conversion with better semantics
Ben Straub 423e3b0c 2013-08-12T11:02:53 Update to clar 7bf638b80
Carlos Martín Nieto e54cfb9b 2013-08-12T11:50:27 odb: free object data when id is ambiguous By the time we recognise this as an ambiguous id, the object's data has been loaded into memory. Free it when returning EABMIGUOUS.
Carlos Martín Nieto 54f3a572 2013-08-09T10:29:11 config: introduce a regex-filtering iterator
Carlos Martín Nieto 5880962d 2013-08-09T09:05:19 config: introduce _iterator_new() As the name suggests, it iterates over all the entries
Russell Belfer ba8b8c04 2013-08-07T09:17:20 Improve building ignore file lists The routines to push and pop ignore files while traversing a directory had some issues. In particular, setting up the initial list would sometimes push an ignore file before it ought to be applied if the starting path was a directory containing an ignore file. Also, the pop function was not always matching the right part of the path and would fail to pop ignores from the list in some cases. This adds some tests that exercise a particular problematic case and then fixes the problems that I could find related to this. At some point, I'd like to isolate this ignore rule management code and rewrite it, but that's a larger project and right now, I'll opt to just try to fix the broken behaviors.
Russell Belfer 4ba64794 2013-08-09T10:52:35 Revert PR #1462 and provide alternative fix This rolls back the changes to fnmatch parsing from commit 2e40a60e847d6c128af23e24ea7a8efebd2427da except for the tests that were added. Instead this adds couple of new flags that can be passed in when attempting to parse an fnmatch pattern. Also, this changes the pathspec match logic to special case matching a filename with a '!' prefix against a negative pattern. This fixes the build.
Russell Belfer fbb6c0c8 2013-08-09T09:35:23 Merge pull request #1764 from ethomson/status_renames_from_rewrites Add rename from rewrites to status
Russell Belfer 33d532dc 2013-08-09T09:32:06 Merge pull request #1462 from yorah/fix/libgit2sharp-issue-379 status: fix handling of filenames with special prefixes
Russell Belfer 7f7ebe13 2013-08-08T12:57:13 Merge pull request #1771 from nvloff/write_empty_config_value config: allow setting empty string as value
Nikolai Vladimirov c57f6682 2013-08-08T21:17:32 config: allow empty string as value `git_config_set_string(config, "config.section", "")` fails when escaping the value. The buffer in `escape_value` is allocated without NULL-termination. And in case of empty string 0 is passed for buffer size in `git_buf_grow`. `git_buf_detach` returns NULL when the allocated size is 0 and that leads to an error return in `GITERR_CHECK_ALLOC` called after `escape_value` The change in `config_file.c` was suggested by Russell Belfer <rb@github.com>
Carlos Martín Nieto 1e96c9d5 2013-08-08T20:47:06 config: add _next() and _iterator_free() Make it look like the refs iterator API.
Carlos Martín Nieto 99dfb538 2013-08-08T17:57:59 config: working multivar iterator Implement the foreach version as a wrapper around the iterator.
Ben Straub 5e96f316 2013-08-08T08:54:38 Merge pull request #1738 from libgit2/diff-patch-content-size Add API for getting at git_diff_patch->content_size
Ben Straub bf145a6a 2013-08-08T08:53:37 Merge pull request #1746 from libgit2/rename-detection-performance Rename detection slow
Ben Straub aaefbdee 2013-08-08T08:48:57 Discriminate path-specific and general UTF-X conversions
Carlos Martín Nieto 4efa3290 2013-08-08T13:41:18 config: get_multivar -> get_multivar_foreach The plain function will return an iterator, so move this one out of the way.
Brodie Rao d19bcb33 2013-06-06T14:49:14 odb_pack: handle duplicate objects from different packs This is based on 24634c6fd02b2240e4a93fad70a08220f8fb793a. This also corrects an issue with error codes being mixed up with the number of found objects.
Ben Straub 2c0128ee 2013-08-07T19:29:33 Rename git_win_str_utf* to git_win32_path_utf*
Ben Straub 9c38f7a6 2013-08-07T13:22:41 Add typedefs for win32 utf-8 and utf-16 buffers ...and normalize the signatures of the two conversion functions.
Ben Straub 75f98a95 2013-08-07T06:12:27 Add checkout test for long file name
Ben Straub c0c51693 2013-08-06T21:05:03 Add long-file-name branch to test repo
Ben Straub 2984f319 2013-08-07T05:55:12 Don't use win32-only macro in test code
Ben Straub 8c8a5490 2013-08-06T20:35:51 Add status test for long paths
Edward Thomson 2d9f5b9f 2013-08-07T11:11:55 Parse config headers with quoted quotes Parse config headers that have the last quote on the line quoted instead of walking off the end.
Russell Belfer c5780abb 2013-08-05T21:58:48 Merge pull request #1765 from arrbee/ambiguous-oids More tests for ambiguous OIDs across packs
Russell Belfer 437224b4 2013-08-05T21:46:32 More tests for ambiguous OIDs across packs The test coverage for ambiguous OIDs was pretty thin. This adds a bunch of new objects both in packs, across packs, and loose that match to 8 characters so that we can test various cases of ambiguous lookups.
Edward Thomson e38f0d69 2013-08-05T14:06:41 Add rename from rewrites to status In git_diff_paired_foreach, temporarily resort the index->workdir diff list by index path so that we can track a rename in the workdir from head->index->workdir.
Nikolai Vladimirov f1af935b 2013-08-05T21:53:09 submodule: check alloc and name presense
Ben Straub d8563619 2013-08-05T11:41:39 Split UTF-16 and UTF-8 buffer sizes for win32 Also fixed up call-sites to use the correct buffer sizes, especially when converting to utf-8.
Russell Belfer e8242022 2013-08-05T09:59:02 Move slow tests to "stress" clar module Create a new section of clar tests "stress" that will default to being off where we can put slow tests that push the library for performance testing purposes.
Russell Belfer 31b42eac 2013-08-04T14:09:44 Restore commented out tests This restores the commented out tests (even though they're slow) and fixes some trailing whitespace.
Edward Thomson 0a38eb42 2013-07-31T22:36:50 Rename test for rename from rewrite A rename test that illustrates a rename from a rewrite.
Edward Thomson a42c2a8c 2013-07-31T21:51:50 Rename test for multiple similar matches A rename test that illustrates a source matching multiple targets.
Russell Belfer d730d3f4 2013-07-31T16:40:42 Major rename detection changes After doing further profiling, I found that a lot of time was being spent attempting to insert hashes into the file hash signature when using the rolling hash because the rolling hash approach generates a hash per byte of the file instead of one per run/line of data. To optimize this, I decided to convert back to a run-based file signature algorithm which would be more like core Git. After changing this, a number of the existing tests started to fail. In some cases, this appears to have been because the test was coded to be too specific to the particular results of the file similarity metric and in some cases there appear to have been bugs in the core rename detection code where only by the coincidence of the file similarity scoring were the expected results being generated. This renames all the variables in the core rename detection code to be more consistent and hopefully easier to follow which made it a bit easier to reason about the behavior of that code and fix the problems that I was seeing. I think it's in better shape now. There are a couple of tests now that attempt to stress test the rename detection code and they are quite slow. Most of the time is spent setting up the test data on disk and in the index. When we roll out performance improvements for index insertion, it should also speed up these tests I hope.
Russell Belfer a5140f4d 2013-07-24T17:11:49 Fix rename detection for tree-to-tree diffs The performance improvements I introduced for rename detection were not able to run successfully for tree-to-tree diffs because the blob size was not known early enough and so the file signature always had to be calculated nonetheless. This change separates loading blobs into memory from calculating the signature. I can't avoid having to load the large blobs into memory, but by moving it forward, I'm able to avoid the signature calculation if the blob won't come into play for renames.
Russell Belfer 397357a0 2013-07-24T13:12:00 Add rename test that used to be really slow Before the optimization commits, this test used to take about 20 seconds to run on my machine. Afterwards, there is still a couple seconds of data setup, but the actual diff and rename detection runs in a fraction of a second.
Russell Belfer 197b8966 2013-07-23T14:34:31 Add hunk/file headers to git_diff_patch_size This allows git_diff_patch_size to account for hunk headers and file headers in the returned size. This required some refactoring of the code that is used to print file headers so that it could be invoked by the git_diff_patch_size API. Also this increases the test coverage and fixes an off-by-one bug in the size calculation when newline changes happen at the end of the file.
Russell Belfer b4a4cf24 2013-07-22T16:07:56 Add git_diff_patch_size() API This adds a new API to get the size in bytes of the diffs in a git_diff_patch object.
Russell Belfer 4cee9b86 2013-07-22T11:41:23 Update init and clean for revwalk::basic tests The new tests don't always want to use the same fixture data as the old ones so this makes it configurable on a per-test basis.
Russell Belfer b7107131 2013-07-22T11:01:19 git_reference_next_name must match git_reference_next The git_reference_next API silently skips invalid references when scanning the loose refs. The git_reference_next_name API should skip the same ones even though it isn't creating the reference object. This adds a test with a an invalid loose reference and makes sure that both APIs skip the same entries and generate the same results.
Ben Straub 97309dd0 2013-07-19T10:43:53 Merge pull request #1726 from crazymaster/development git_buf_text_gather_stats doesn't work for multi-byte characters
crazymaster d0b25d9d 2013-07-15T08:14:00 Fix
crazymaster 2185dd6f 2013-07-15T07:59:04 Fix typo
crazymaster 19bee769 2013-07-15T07:39:16 Revert "Replace Japanese characters with the encoded hexadecimal values" This reverts commit a91e4d6b21e141c2abc76b65b2d4c91d5d3e03cc.
crazymaster a91e4d6b 2013-07-15T07:19:42 Replace Japanese characters with the encoded hexadecimal values
crazymaster d6d34cd0 2013-07-13T02:10:16 Add test for multi-byte characters
nulltoken 80fd31fa 2013-07-13T13:30:23 revparse: Don't return a reference when asked for a git object Fix #1722
nulltoken d6cb13d7 2013-07-13T14:00:05 tests: Fix memory leak
Edward Thomson 1c13b0bf 2013-07-12T15:30:05 test that suggests tags arent fully peeled during push
Russell Belfer 584f2d30 2013-07-11T11:04:42 Fix warnings on Win64
Russell Belfer 125655fe 2013-07-02T16:49:57 Untracked directories with .git should be ignored This restores a behavior that was accidentally lost during some diff refactoring where an untracked directory that contains a .git item should be treated as IGNORED, not as UNTRACKED. The submodule code already detects this, but the diff code was not handling the scenario right. This also updates a number of existing tests that were actually exercising the behavior but did not have the right expectations in place. It actually makes the new `test_diff_submodules__diff_ignore_options` test feel much better because the "not-a-submodule" entries are now ignored instead of showing up as untracked items. Fixes #1697
Russell Belfer 9564229a 2013-06-30T08:43:07 Add tests for diff.ignoreSubmdules config
Russell Belfer f9775a37 2013-06-29T23:22:31 Add ignore_submodules to diff options This adds correct support for an equivalent to --ignore-submodules in diff, where an actual ignore value can be passed to diff to override the per submodule settings in the configuration. This required tweaking the constants for ignore values so that zero would not be used and could represent an unset option to the diff. This was an opportunity to move the submodule values into include/git2/types.h and to rename the poorly named DEFAULT values for ignore and update constants to RESET instead. Now the GIT_DIFF_IGNORE_SUBMODULES flag is exactly the same as setting the ignore_submodules option to GIT_SUBMODULE_IGNORE_ALL (which is actually a minor change from the old behavior in that submodules will now be treated as UNMODIFIED deltas instead of being left out totally - if you set GIT_DIFF_INCLUDE_UNMODIFIED). This includes tests for the various new settings.
Russell Belfer e807860f 2013-06-27T16:52:38 Add timestamp check to submodule status This is probably not the final form of this change, but this is a preliminary version of checking a timestamp to see if the cached working directory HEAD OID matches the current. Right now, this uses the timestamp on the index and is, like most of our timestamp checking, subject to having only second accuracy.
Russell Belfer 2e3e273e 2013-06-29T13:20:45 Update diff to new internal submodule status API Submodules now expose an internal status API that allows diff to get back the OID values from the submodule very easily and also to avoiding caching issues and to override the ignore setting for the submodule.
Russell Belfer 3fe046cf 2013-06-29T13:13:38 Add BARE option to git_repository_open_ext This adds a BARE option to git_repository_open_ext which allows a fast open path that still knows how to read gitlinks and to search for the actual .git directory from a subdirectory. `git_repository_open_bare` is still simpler and faster, but having a gitlink aware fast open is very useful for submodules where we want to quickly be able to peek at the HEAD and index data without doing any other meaningful repo operations.
Russell Belfer 4535f044 2013-06-27T16:12:44 More diff submodule tests for cache issues The submodules code caches data about submodules in a way that can cause problems. This adds some tests that try making various modifications to the state of a submodule to see where we can catch out problems in the submodule caching. Right now, I've put in an extra git_submodule_reload_all so that the test will pass, but with that commented out, the test fails. I'm working on fixing the broken version of the test at which point I'll commit the fix and delete the extra reload that makes the test pass.
Russell Belfer 3e7d7100 2013-06-27T16:12:00 Fix diff test helper to show parent file/line
Russell Belfer 49621a34 2013-06-27T15:46:46 Fix memory leak in test
Russell Belfer 12f8fe00 2013-06-27T15:43:12 More improvements to submodule diff tests This controls for the diff.mnemonicprefix setting so that can't break the tests. Also, this expands one test to emulate an ObjectiveGit test more closely.
Russell Belfer 0105b55e 2013-06-27T15:26:31 Add another submodule test of dirty wd
Russell Belfer 2b672d5b 2013-07-08T22:46:36 Add git_pathspec_match_diff API This adds an additional pathspec API that will match a pathspec against a diff object. This is convenient if you want to handle renames (so you need the whole diff and can't use the pathspec constraint built into the diff API) but still want to tell if the diff had any files that matched the pathspec. When the pathspec is matched against a diff, instead of keeping a list of filenames that matched, instead the API keeps the list of git_diff_deltas that matched and they can be retrieved via a new API git_pathspec_match_list_diff_entry. There are a couple of other minor API extensions here that were mostly for the sake of convenience and to reduce dependencies on knowing the internal data structure between files inside the library.
Russell Belfer 6fc5a581 2013-07-08T22:42:02 Basic bit vector This is a simple bit vector object that is not resizable after the initial allocation but can be of arbitrary size. It will keep the bti vector entirely on the stack for vectors 64 bits or less, and will allocate the vector on the heap for larger sizes. The API is uniform regardless of storage location. This is very basic right now and all the APIs are inline functions, but it is useful for storing an array of boolean values.
Russell Belfer d2ce27dd 2013-06-24T23:16:06 Add public API for pathspec matching This adds a new public API for compiling pathspecs and matching them against the working directory, the index, or a tree from the repository. This also reworks the pathspec internals to allow the sharing of code between the existing internal usage of pathspec matching and the new external API. While this is working and the new API is ready for discussion, I think there is still an incorrect behavior in which patterns are always matched against the full path of an entry without taking the subdirectories into account (so "s*" will match "subdir/file" even though it wouldn't with core Git). Further enhancements are coming, but this was a good place to take a functional snapshot.