tests-clar


Log

Author Commit Date CI Message
Carlos Martín Nieto 07fb67f9 2013-09-22T05:55:39 merge: reverse array and length parameter order Make it pair up with the one for commits. This fixes #1691.
Ben Straub 32b247d5 2013-09-19T10:30:43 Suppress noise from running Valgrind on OSX 10.8
Russell Belfer f60ed4e6 2013-09-16T15:08:35 Update clar and recreate cl_assert_equal_sz This updates clar to the version without cl_assert_equal_sz and then adds a new version of that macro the clar_libgit2.h. The new version works around a strange issue that seemed to be arising on release builds with VS 10 64-bit builds.
Russell Belfer eefc32d5 2013-09-16T12:54:40 Bug fixes and cleanups This contains a few bug fixes and some header and API cleanups. The main API change is that filters should now use GIT_PASSTHROUGH to indicate that they wish to skip processing a file instead of GIT_ENOTFOUND. The bug fixes include a possible out-of-range buffer access in the ident filter, a filter ordering problem I introduced into the custom filter tests on Windows, and a filter buf NUL termination issue that was coming up on Linux.
Russell Belfer eab3746b 2013-09-15T22:23:39 More filtering tests including order This adds more tests of filters, including the ident filter when mixed with custom filters. I was able to combine with the reverse filter and demonstrate that the order of filter application with the default priority constants matches the order of core Git. Also, this fixes two issues in the ident filter: preventing ident expansion on binary files and avoiding a NULL dereference when dollar sign characters are found without Id.
Russell Belfer 37f9e409 2013-09-13T21:43:00 Some tests with ident and crlf filters Fixed the filter order to match core Git, too. This test demonstrates an interesting behavior of core Git (which is totally reasonable and which libgit2 matches, although mostly by coincidence). If you use the ident filter and commit a file with a garbage ident in it, like '$Id: this is just garbage$' and then immediately do a 'git checkout-index' with the new file, Git will not consider the file out of date and will not overwrite the file with an updated $Id$. Libgit2 has the same behavior. If you remove the file and then do a checkout-index, it will be replaced with a filtered version that has injected the OID correctly.
Russell Belfer 155fa234 2013-09-05T15:06:42 Add clar helper to create new commit from index There were a lot of places in the test code base that were creating a commit from the index on the current branch. This just adds a helper to handle that case pretty easily. There was only one test where this change ended up tweaking the test data, so pretty easy and mostly just a cleanup.
Russell Belfer 13f36ffb 2013-09-13T16:30:21 Add clar helpers for testing file equality These are a couple of new clar helpers for testing that a file has expected contents that I extracted from the checkout code. Actually wrote this as part of an abandoned earlier attempt at a new filters API, but it will be useful now for some of the tests I'm going to write.
Russell Belfer fa9cc148 2013-09-13T13:41:33 Fix cleanup issues with new tests
Russell Belfer 8427757f 2013-09-13T12:32:45 Fixing up some win32 issues with autocrlf
Russell Belfer 4b11f25a 2013-09-11T16:38:33 Add ident filter This adds the ident filter (that knows how to replace $Id$) and tweaks the filter APIs and code so that git_filter_source objects actually have the updated OID of the object being filtered when it is a known value.
Russell Belfer 40cb40fa 2013-09-11T14:23:39 Add functions to manipulate filter lists Extend the git2/sys/filter API with functions to look up a filter and add it manually to a filter list. This requires some trickery because the regular attribute lookups and checks are bypassed when this happens, but in the right hands, it will allow a user to have granular control over applying filters.
Russell Belfer ad7417d7 2013-09-13T09:44:30 Make filter tests somewhat more robust The global and system config could interfere with the filter tests by imposing CRLF filtering where it was not anticipated. This better isolates the tests from the system settings.
Russell Belfer d5b1866c 2013-09-13T09:26:26 Rearrange clar submodule cleanup code
Russell Belfer b47349b8 2013-09-12T14:48:24 Port tests from PR 1683 This ports over some of the tests from https://github.com/libgit2/libgit2/pull/1683 by @yorah and @ethomson
Russell Belfer a9f51e43 2013-09-11T22:00:36 Merge git_buf and git_buffer This makes the git_buf struct that was used internally into an externally available structure and eliminates the git_buffer. As part of that, some of the special cases that arose with the externally used git_buffer were blended into the git_buf, such as being careful about git_buf objects that may have a NULL ptr and allowing for bufs with a valid ptr and size but zero asize as a way of referring to externally owned data.
Russell Belfer 2a7d224f 2013-09-10T16:33:32 Extend public filter api with filter lists This moves the git_filter_list into the public API so that users can create, apply, and dispose of filter lists. This allows more granular application of filters to user data outside of libgit2 internals. This also converts all the internal usage of filters to the public APIs along with a few small tweaks to make it easier to use the public git_buffer stuff alongside the internal git_buf.
Russell Belfer 974774c7 2013-09-09T16:57:34 Add attributes to filters and fix registry The filter registry as implemented was too primitive to actually work once multiple filters were coming into play. This expands the implementation of the registry to handle multiple prioritized filters correctly. Additionally, this adds an "attributes" field to a filter that makes it really really easy to implement filters that are based on one or more attribute values. The lookup and even simple value checking can all happen automatically without custom filter code. Lastly, with the registry improvements, this fills out the filter lifecycle callbacks, with initialize and shutdown callbacks that will be called before the filter is first used and after it is last invoked. This allows for system-wide initialization and cleanup by the filter.
Russell Belfer 85d54812 2013-08-28T16:44:04 Create public filter object and use it This creates include/sys/filter.h with a basic definition of a git_filter and then converts the internal code to use it. There are related internal objects (git_filter_list) that we will want to publish at some point, but this is a first step.
Russell Belfer 0cf77103 2013-08-26T23:17:07 Start of filter API + git_blob_filtered_content This begins the process of exposing git_filter objects to the public API. This includes: * new public type and API for `git_buffer` through which an allocated buffer can be passed to the user * new API `git_blob_filtered_content` * make the git_filter type and GIT_FILTER_TO_... constants public
Vicent Martí 4581f9d8 2013-09-17T08:09:57 Merge pull request #1833 from libgit2/cmn/config-include Support config includes
Carlos Martín Nieto 605da51a 2013-09-17T09:50:30 No such thing as an orphan branch Unfortunately git-core uses the term "unborn branch" and "orphan branch" interchangeably. However, "orphan" is only really there for the checkout command, which has the `--orphan` option so it doesn't actually create the branch. Branches never have parents, so the distinction of a branch with no parents is odd to begin with. Crucially, the error messages deal with unborn branches, so let's use that.
Russell Belfer e580afd8 2013-09-13T14:33:26 Add tests for git_tree_walk This tests the fixes for issues from #1849
nulltoken 6f200361 2013-09-12T13:50:35 clar: Move cl_assert_equal_sz() definition to clar.h
nulltoken 273ddc54 2013-09-12T13:50:00 clar: Fix clar__assert_equal error message formating
Russell Belfer 6c38e60a 2013-09-10T16:55:58 Merge pull request #1838 from libgit2/cmn/first-parent revwalk: allow simplifying by first-parent
nulltoken 209f9b67 2013-09-08T18:25:17 odb: Teach loose backend to return EAMBIGUOUS
Carlos Martín Nieto 15f7b9b8 2013-09-08T00:52:26 revwalk: allow simplifying by first-parent When enabled, only the first parent of each commit will be queued, enabling a simple way of using first-parent simplification.
nulltoken 031f3f80 2013-09-07T22:39:05 odb: Error when streaming in too [few|many] bytes
Carlos Martín Nieto 53ea0513 2013-09-07T19:07:39 config: handle realloc issues from larger depths As the include depth increases, the chance of a realloc increases. This means that whenever we run git_array_alloc() or call config_parse(), we need to remember what our reader's index is so we can look it up again.
Carlos Martín Nieto 73fc5e01 2013-09-06T21:12:26 config: fix variable overriding When two or more variables of the same name exist and the user asks for a scalar, we must return the latest value assign to it.
Carlos Martín Nieto a9fb7989 2013-09-06T20:51:35 config: refresh included files We need to refresh the variables from the included files if they are changed, so loop over all included files and re-parse the files if any of them has changed.
Carlos Martín Nieto d8d25acb 2013-09-05T19:24:20 config: add support for include directives Relative, absolute and home-relative paths are supported. The recursion limit it set at 10, just like in git.
Vicent Martí ef6389ad 2013-09-07T09:18:56 Merge pull request #1836 from libgit2/ntk/fix/leaks Fix memory leaks
nulltoken e839efbe 2013-09-07T17:51:24 tests: Fix memory leaks
nulltoken a8d67afe 2013-09-07T17:21:41 revparse: Prevent unnecessary odb backend calls
nulltoken 4047950f 2013-08-29T14:19:34 odb: Prevent stream_finalize_write() from overwriting Now that #1785 is merged, git_odb_stream_finalize_write() calculates the object id before invoking the odb backend. This commit gives a chance to the backend to check if it already knows this object.
nulltoken ae4a4866 2013-08-29T14:12:13 blob: Slightly enforce a create_fromchunks() test
Russell Belfer a7fcc44d 2013-09-05T16:14:32 Better macro name for is-exec-bit-set test
Russell Belfer af22dabb 2013-09-05T12:01:17 GIT_MODE_TYPE should exclude setgid bits The GIT_MODE_TYPE macro was looking at all bits above the permissions, but it should really just look at the top bits so that it will give the right results for a setgid or setuid entry. Since we're now using these macros in the tests, this was causing a test failure on platforms that don't support setgid.
Russell Belfer c97d407d 2013-09-05T11:45:29 Fix tests of file modes This fixes an issue checking file modes in the tests that initialize a repo from a template directory when a symlink is used in the template. Also, this updates some other places where we are examining file modes to use the new macros.
Russell Belfer 27061b15 2013-09-05T10:25:16 Fix some newer GCC compiler warnings
Russell Belfer 9ce4f7da 2013-09-04T16:41:34 Fix tests to use core.filemode correctly Some windows tests were failing
Russell Belfer 2a54c7f4 2013-09-04T16:24:36 _umask is function name on Windows
Russell Belfer abfed59c 2013-09-04T16:21:18 Clean up one other mode_t assertion
Russell Belfer 780f3e54 2013-09-04T16:13:18 Make tests take umask into account It seems that libgit2 is correctly applying the umask when initializing a repository from a template and when creating new directories during checkout, but the test suite is not accounting for possible variations due to the umask. This updates that so that the test suite will work regardless of the umask.
Russell Belfer cf94024c 2013-09-04T11:42:48 Update clar
Ben Straub 61d57b7a 2013-09-04T14:27:59 Test pushing to remotes with "file:///" urls
Vicent Martí e9853592 2013-09-04T06:20:36 Merge pull request #1817 from libgit2/ntk/fix/backend/honor_refresh_capabilities Of backends and refreshers...
Russell Belfer cae52938 2013-09-03T14:00:27 Fix resolving relative windows network paths
Russell Belfer 0d1af399 2013-09-03T12:33:34 don't use inline in tests for win32
Vicent Martí 6208bd49 2013-09-03T12:29:18 Merge pull request #1804 from ethomson/rewrites Minor changes for rewrites
Nikolai Vladimirov 6d9a6c5c 2013-09-03T07:58:21 path: properly resolve relative paths
Krzysztof Adamski 3b75b684 2013-09-01T18:53:07 Define S_IREAD i S_IWRITE for Android.
nulltoken a12e069a 2013-08-30T16:31:52 odb: Honor the non refreshing capability of a backend
Carlos Martín Nieto 0001c023 2013-08-29T13:22:44 Fix typo _delete -> _free
Vicent Martí dbecec37 2013-08-28T09:38:14 Merge pull request #1805 from libgit2/threading-packed-load Thread safety for the refdb_fs
Edward Thomson 17c7fbf6 2013-08-21T14:07:53 Split rewrites, status doesn't return rewrites Ensure that we apply splits to rewrites, even if we're not interested in examining it closely for rename/copy detection. In keeping with core git, status should not display rewrites, it should simply show files as "modified".
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