tests


Log

Author Commit Date CI Message
Carlos Martín Nieto 07bd3e57 2015-05-07T12:57:56 proxy: ask the user for credentials if necessary
Edward Thomson bbd65ad2 2016-04-11T13:39:31 tests: skip the unreadable file tests as root When running as root, skip the unreadable file tests, because, well, they're probably _not_ unreadable to root unless you've got some crazy NSA clearance-level honoring operating system shit going on.
Edward Thomson 0e00eecf 2016-04-11T13:29:54 Merge pull request #3736 from libgit2/cmn/dwim-general-message refs: provide a more general error message for dwim
Edward Thomson d22a8b95 2016-04-11T11:50:11 refs::create: strict object creation on by default When we turned strict object creation validation on by default, we forgot to inform the refs::create tests of this. They, in fact, believed that strict object creation was off by default. As a result, their cleanup function went and turned strict object creation off for the remaining tests.
Carlos Martín Nieto 6d22ef7a 2016-04-11T11:37:02 reset: use real ids for the tests This lets us run with strict object creation on.
Carlos Martín Nieto 77965c68 2016-04-11T17:43:07 refs: provide a more general error message for dwim If we cannot dwim the input, set the error message to be explicit about that. Otherwise we leave the error for the last failed lookup, which can be rather unexpected as it mentions a remote when the user thought they were trying to look up a branch.
Andreas Henriksson 04f47a43 2016-04-06T10:37:30 tests: fix core/stream test when built with openssl off When passing -DUSE_OPENSSL:BOOL=OFF to cmake the testsuite will fail with the following error: core::stream::register_tls [/tmp/libgit2/tests/core/stream.c:40] Function call failed: (error) error -1 - <no message> Fix test to assume failure for tls when built without openssl. While at it also fix GIT_WIN32 cpp to check if it's defined or not.
Carlos Martín Nieto 381caf56 2016-04-02T22:19:42 Merge pull request #3724 from ethomson/submodule_start_supports_silly_slashes iterator/diff: allow trailing `/` on start/end paths to match submodules
Edward Thomson d47f7e1c 2016-04-02T13:03:09 iterator: support trailing `/` in start for submod Allow callers to specify a start path with a trailing slash to match a submodule, instead of just a directory. This is for some legacy behavior that's sort of dumb, but there it is.
Edward Thomson 2e0391f4 2016-04-02T11:33:00 diff: test submodules are found with trailing `/` Test that submodules are found when the are included in a pathspec but have a trailing slash.
Carlos Martín Nieto d364dc8b 2016-04-01T14:33:42 ignore: don't use realpath to canonicalize path If we're looking for a symlink, realpath will give us the resolved path, which is not what we're after, but a canonicalized version of the path the user asked for.
Carlos Martín Nieto 1cac688d 2016-04-01T00:29:51 Merge pull request #3719 from libgit2/ethomson/submodule_status WD iterator: properly identify submodules
Edward Thomson 74ab5f2c 2016-03-31T17:33:44 status: test submodules with mixed case
Edward Thomson 17442b28 2016-03-30T17:47:05 leaks: fix some leaks in the tests
Carlos Martín Nieto f5c874a4 2016-03-29T14:47:31 Plug a few leaks
Carlos Martín Nieto 2f0450f4 2016-03-29T03:26:43 Merge pull request #3712 from ethomson/config_duplicate_section config: don't write duplicate section
Edward Thomson b085ecbe 2016-03-28T13:51:21 Merge pull request #3703 from libgit2/cmn/multivar-set-locked config: don't special-case multivars that don't exist yet
Edward Thomson 76e1a679 2016-03-28T08:56:13 config::write::repeated: init our buffer
Carlos Martín Nieto 3e95bd36 2016-03-04T14:51:16 config: show we write a spurious duplicated section header We should notice that we are in the correct section to add. This is a cosmetic bug, since replacing any of these settings does work.
Marc Strapetz c017c183 2016-03-22T10:29:12 iterator: new workdir-iterator test for pathlist + includings trees
Marc Strapetz 09064f15 2016-03-22T10:28:50 iterator: new index-iterator test for pathlist + includings trees
Marc Strapetz 8152a748 2016-03-22T10:27:50 iterator: more pathlist-related tests should test actual paths
Edward Thomson d712c2b2 2016-03-21T18:30:21 iterator: don't run the gunk test by default on CI (It's slow!)
Edward Thomson 0ef0b71c 2016-03-21T12:54:47 iterator: refactor index iterator
Edward Thomson ba6f86eb 2016-03-18T17:33:46 Introduce `git_path_common_dirlen`
Edward Thomson de034cd2 2016-03-18T10:59:38 iterator: give the tests a proper hierarchy Iterator tests were split over repo::iterator and diff::iterator, with duplication between the two. Move them to iterator::index, iterator::tree, and iterator::workdir.
Jeff Hostetler df25daef 2016-01-04T12:12:24 Added clar test for #3568
Edward Thomson 6cd9573f 2016-03-17T15:09:38 iterator: test that we can `advance_into` empty dirs Prior iterator implementations returned `GIT_ENOTFOUND` when trying to advance into empty directories. Ensure that we no longer do that and simply handle them gracefully.
joshaber b6204260 2016-02-10T13:46:14 Failing test.
Marc Strapetz ae86aa5a 2016-03-16T11:38:02 iterator: test pathlist handling for directories tree_iterator was only working properly for a pathlist containing file paths. In case of directory paths, it didn't match children which contradicts GIT_DIFF_DISABLE_PATHSPEC_MATCH and is different from index_iterator and fs_iterator. As a consequence head-to-index status reporting for a specific directory did not work properly -- all files have been reported as added. Include additional tests.
Edward Thomson 6bcddf88 2016-03-16T17:14:36 iterator: test `advance_over` with a pathlist
Edward Thomson 9fb2527f 2016-03-16T16:29:38 iterator: add tests for advance_over `git_iterator_advance_over` is a gnarly bit of code with no actual tests.
Edward Thomson 85541f43 2016-03-16T13:31:35 iterator: test workdir pathlist with deep paths In the workdir iterator we do some tricky things to step down into directories to look for things that are in our pathlist. Make sure that we don't confuse between folders that we're definitely going to return everything in and folders that we're only stepping down into to keep looking for matches.
Edward Thomson 908d8de8 2016-03-16T12:15:55 iterator: workdir tests with submodules Ensure that when specifying start/end paths, or pathlists, that we deal correctly with submodules.
Edward Thomson c3d195f1 2016-03-16T11:45:44 iterator: expand workdir tests with pathlist Expand the workdir tests to validate the paths in case sensitive and insensitive tests.
Edward Thomson 4c88198a 2016-03-16T10:17:20 iterator: test that we're at the end of iteration Ensure that we have hit the end of iteration; previously we tested that we saw all the values that we expected to see. We did not then ensure that we were at the end of the iteration (and that there were subsequently values in the iteration that we did *not* expect.)
Edward Thomson d051de24 2016-03-10T12:54:33 iterator: test fs iterator w/ many nested empty dirs
Edward Thomson a4f520a6 2016-03-10T11:07:13 iterator: skip unreadable directories in fs iterator Do not abort iteration in the middle when encountering an unreadable directory. Instead, skip it, as if it didn't exist.
Edward Thomson be30387e 2016-02-25T16:05:18 iterators: refactored tree iterator Refactored the tree iterator to never recurse; simply process the next entry in order in `advance`. Additionally, reduce the number of allocations and sorting as much as possible to provide a ~30% speedup on case-sensitive iteration. (The gains for case-insensitive iteration are less majestic.)
Edward Thomson 277c85eb 2016-03-02T15:38:13 repo::iterator: don't go out of bounds
Edward Thomson 684b35c4 2016-02-25T15:11:14 iterator: disambiguate reset and reset_range Disambiguate the reset and reset_range functions. Now reset_range with a NULL path will clear the start or end; reset will leave the existing start and end unchanged.
Edward Thomson 8a5a2e2f 2016-03-17T00:47:50 status: update test to include valid OID
Carlos Martín Nieto 661db4f4 2016-03-23T03:45:53 Merge pull request #3704 from ethomson/tree-reuse tree: drop the now-unnecessary entries vector
Carlos Martín Nieto 6669e3e8 2015-11-08T04:28:08 blob: remove _fromchunks() The callback mechanism makes it awkward to write data from an IO source; move to `_fromstream()` which lets the caller remain in control, in the same vein as we prefer iterators over foreach callbacks.
Carlos Martín Nieto 35e68606 2015-11-04T10:36:50 blob: fix fromchunks iteration counter By returning when the count goes to zero rather than below it, setting `howmany` to 7 in fact writes out the string 6 times. Correct the termination condition to write out the string the amount of times we specify.
Carlos Martín Nieto 0a5c6028 2015-11-04T10:30:48 blob: introduce creating a blob by writing into a stream The pair of `git_blob_create_frombuffer()` and `git_blob_create_frombuffer_commit()` is meant to replace `git_blob_create_fromchunks()` by providing a way for a user to write a new blob when they want filtering or they do not know the size. This approach allows the caller to retain control over when to add data to this buffer and a more natural fit into higher-level language's own stream abstractions instead of having to handle IO wait in the callback. The in-memory buffer size of 2MB is chosen somewhat arbitrarily to be a round multiple of usual page sizes and a value where most blobs seem likely to be either going to be way below or way over that size. It's also a round number of pages. This implementation re-uses the helper we have from `_fromchunks()` so we end up writing everything to disk, but hopefully more efficiently than with a default filebuf. A later optimisation can be to avoid writing the in-memory contents to disk, with some extra complexity.
Edward Thomson e2e4bae9 2016-03-22T00:18:44 tree: drop the now-unnecessary entries vector Remove the now-unnecessary entries vector. Add `git_array_search` to binary search through an array to accomplish this.
Carlos Martín Nieto 6f09911c 2016-03-21T21:10:26 config: don't special-case multivars that don't exist yet This special-casing ignores that we might have a locked file, so the hashtable does not represent the contents of the file we want to write. This causes multivar writes to overwrite entries instead of add to them when under lock. There is no need for this as the normal code-path will write to the file just fine, so simply get rid of it.
Carlos Martín Nieto 60a194aa 2016-03-20T11:00:12 tree: re-use the id and filename in the odb object Instead of copying over the data into the individual entries, point to the originals, which are already in a format we can use.
Edward Thomson d953c450 2016-02-28T21:30:00 merge drivers: handle configured but not found driver
Edward Thomson 6d8b2cdb 2016-02-28T09:34:11 merge driver: remove `check` callback Since the `apply` callback can defer, the `check` callback is not necessary. Removing the `check` callback further makes the `payload` unnecessary along with the `cleanup` callback.
Edward Thomson 58d33126 2015-12-26T19:47:17 merge driver: tests for set and unset merge attribute Ensure that setting the merge attribute forces the built-in default `text` driver and does *not* honor the `merge.default` configuration option. Further ensure that unsetting the merge attribute forces a conflict (the `binary` driver).
Edward Thomson d3f0875a 2015-12-25T00:34:39 merge driver: tests for custom default merge drivers
Edward Thomson 7d307c1e 2015-12-23T23:52:02 merge driver: test GIT_EMERGECONFLICT When a `check` or `apply` callback function returns `GIT_EMERGECONFLICT` stop and product a conflict.
Edward Thomson 59f29314 2015-12-23T23:44:58 merge driver: test GIT_PASSTHROUGH When a `check` or `apply` callback function returns `GIT_PASSTHROUGH`, move on to the default merge driver.
Edward Thomson 3f04219f 2015-12-23T10:23:08 merge driver: introduce custom merge drivers Consumers can now register custom merged drivers with `git_merge_driver_register`. This allows consumers to support the merge drivers, as configured in `.gitattributes`. Consumers will be asked to perform the file-level merge when a custom driver is configured.
Stan Hu 7a74590d 2015-12-03T09:57:56 Fix rebase bug and include test for merge=union
Edward Thomson ba349322 2016-03-17T06:57:56 Merge pull request #3673 from libgit2/cmn/commit-with-signature commit: add function to attach a signature to a commit
Edward Thomson a151eb54 2016-03-17T06:55:24 Merge pull request #3685 from pks-t/pks/memleaks Test memleaks
Carlos Martín Nieto bf804d40 2016-03-17T10:45:22 commit: fix extraction of single-line signatures The function to extract signatures suffers from a similar bug to the header field finding one by having an unecessary line feed check as a break condition of its loop. Fix that and add a test for this single-line signature situation.
Carlos Martín Nieto 02d61a3b 2016-03-10T10:53:20 commit: add function to attach a signature to a commit In combination with the function which creates a commit into a buffer, this allows us to more easily create signed commits.
Dirkjan Bussink c577efbb 2016-03-14T12:41:41 Use general cl_git_fail because the error is generic
Dirkjan Bussink fa72d6da 2016-03-14T12:02:00 Setup better defaults for OpenSSL ciphers This ensures that when using OpenSSL a safe default set of ciphers is selected. This is done so that the client communicates securely and we don't accidentally enable unsafe ciphers like RC4, or even worse some old export ciphers. Implements the first part of https://github.com/libgit2/libgit2/issues/3682
Patrick Steinhardt 35b7bca2 2016-03-11T09:58:38 tests: transport: fix memory leaks with registering transports
Patrick Steinhardt e756877d 2016-03-11T09:07:29 tests: nsec: correctly free nsec_path git_buf_clear does not free allocated memory associated with a git_buf. Use `git_buf_free` instead to correctly free its memory and plug the memory leak.
Carlos Martín Nieto 2ba9a0dd 2016-03-09T23:45:33 Merge pull request #3623 from ethomson/rebase_with_commit rebase: additional setup tests of exotic behavior
Vicent Marti 9a786650 2016-03-09T11:00:27 odb: Handle corner cases in `git_odb_expand_ids` The old implementation had two issues: 1. OIDs that were too short as to be ambiguous were not being handled properly. 2. If the last OID to expand in the array was missing from the ODB, we would leak a `GIT_ENOTFOUND` error code from the function.
Vicent Marti c68044a8 2016-03-08T21:17:38 Merge pull request #3656 from ethomson/exists_prefixes Introduce `git_odb_expand_ids`
Edward Thomson 62484f52 2016-03-08T14:09:55 git_odb_expand_ids: accept git_odb_expand_id array Take (and write to) an array of a struct, `git_odb_expand_id`.
Edward Thomson 4b1f0f79 2016-03-08T11:44:21 git_odb_expand_ids: rename func, return the type
Edward Thomson b7809b84 2016-03-08T13:38:55 Merge pull request #3555 from cbargren/ssh-git-protocols Support for ssh+git and git+ssh protocols
Edward Thomson 534ca888 2016-03-08T13:35:11 Merge pull request #3652 from libgit2/cmn/commit-to-memory commit: split creating the commit and writing it out
Carlos Martín Nieto 47cb42da 2016-03-03T22:56:02 commit: split creating the commit and writing it out Sometimes you want to create a commit but not write it out to the objectdb immediately. For these cases, provide a new function to retrieve the buffer instead of having to go through the db.
Carlos Martín Nieto eeff96c4 2016-03-08T10:43:33 Merge pull request #3655 from ethomson/nanosecond_defaults Enable nanosecond resolution by default
Edward Thomson 53fb823b 2016-03-07T17:37:17 index::racy: force racy entry Instead of hoping that we can get a racy entry by going real fast and praying real hard, just create a racy entry.
Edward Thomson 565c4199 2016-03-07T17:04:32 index::nsec: don't expect shit filesystems to not suck If the underlying filesystem doesn't support better than one second resolution, then don't expect that turning on `GIT_USE_NSEC` does anything magical to change that.
Edward Thomson 6c04269c 2016-03-04T00:50:35 git_odb_exists_many_prefixes: query odb for multiple short ids Query the object database for multiple objects at a time, given their object ID (which may be abbreviated) and optional type.
Edward Thomson 6abdf52d 2016-03-07T09:37:51 merge::workdir::dirty: update to use `st_ctime_nsec` Update unit test to use newfangled `st_ctime_nsec`, which provides indirection to the platform-correct name.
Carlos Martín Nieto ea5bf6bb 2016-03-04T12:34:38 treebuilder: don't try to verify submodules exist in the odb Submodules don't exist in the objectdb and the code is making us try to look for a blob with its commit id, which is obviously not going to work. Skip the test if the user wants to insert a submodule.
Carlos Martín Nieto e23efa6d 2016-03-03T21:03:10 tests: take the version from our define
Carlos Martín Nieto 9b3fc895 2016-03-03T11:17:36 tests: plug a leak
Edward Thomson 09d99680 2016-02-28T20:10:44 rebase: additional tests for completing a rebase
Edward Thomson f2dddf52 2016-02-28T15:51:38 turn on strict object validation by default
Edward Thomson 4afe536b 2016-02-28T16:02:49 tests: use legitimate object ids Use legitimate (existing) object IDs in tests so that we have the ability to turn on strict object validation when running tests.
Edward Thomson 98c34149 2016-02-28T15:11:15 refs: honor strict object creation
Edward Thomson 6ddf533a 2016-02-23T18:29:16 git_index_add: validate objects in index entries (optionally) When `GIT_OPT_ENABLE_STRICT_OBJECT_CREATION` is turned on, validate the index entries given to `git_index_add`.
Edward Thomson 2bbc7d3e 2016-02-23T15:00:27 treebuilder: validate tree entries (optionally) When `GIT_OPT_ENABLE_STRICT_OBJECT_CREATION` is turned on, validate the tree and parent ids given to treebuilder insertion.
Edward Thomson ef63bab3 2016-02-23T13:34:35 git_commit: validate tree and parent ids When `GIT_OPT_ENABLE_STRICT_OBJECT_CREATION` is turned on, validate the tree and parent ids given to commit creation functions.
Edward Thomson 6cc4bac8 2016-02-28T11:31:10 Merge pull request #3577 from rossdylan/rossdylan/pooldebug Add a new build flag to disable the pool allocator
Edward Thomson a4c55069 2016-02-25T11:31:18 nsec: update staging test for GIT_USE_NSECS The index::nsec::staging_maintains_other_nanos test was created to ensure that when we stage an entry when GIT_USE_NSECS is *unset* that we truncate the index entry and do not persist the (old, invalid) nanosec values. Ensure that when GIT_USE_NSECS is *set* that we do not do that, and actually write the correct nanosecond values.
Edward Thomson 7bab2e8f 2016-02-22T23:04:40 git_libgit2_opts: validate key
Carlos Martín Nieto 5663d4f6 2016-02-18T12:31:56 Merge pull request #3613 from ethomson/fixups Remove most of the silly warnings
Carlos Martín Nieto 594a5d12 2016-02-18T12:28:06 Merge pull request #3619 from ethomson/win32_forbidden win32: allow us to read indexes with forbidden paths on win32
Edward Thomson 2a39818c 2016-02-17T15:28:20 rebase: additional setup tests of exotic behavior Test some additional exotic rebase setup behavior: that we are able to set up properly when already in a detached HEAD state, that the caller specifies all of branch, upstream and onto, and that the caller specifies branch, upstream and onto by ID.
Edward Thomson 318b825e 2016-02-16T17:11:46 index: allow read of index w/ illegal entries Allow `git_index_read` to handle reading existing indexes with illegal entries. Allow the low-level `git_index_add` to add properly formed `git_index_entry`s even if they contain paths that would be illegal for the current filesystem (eg, `AUX`). Continue to disallow `git_index_add_bypath` from adding entries that are illegal universally illegal (eg, `.git`, `foo/../bar`).
Edward Thomson 4be2aa57 2016-02-16T18:50:08 win32: tests around handling forbidden paths Introduce a repository that contains some paths that were illegal on PC-DOS circa 1981 (like `aux`, `con`, `com1`) and that in a bizarre fit of retrocomputing, remain illegal on some "modern" computers, despite being "new technology". Introduce some aspirational tests that suggest that we should be able to cope with trees and indexes that contain paths that would be illegal on the filesystem, so that we can at least diff them. Further ensure that checkout will not write a repository with forbidden paths.
Carlos Martín Nieto eadd0f05 2016-02-16T14:06:48 commit: expose the different kinds of errors We should be checking whether the object we're looking up is a commit, and we should let the caller know whether the not-found return code comes from a bad object type or just a missing signature.
Edward Thomson 0d9a39ea 2016-02-12T10:02:18 win32: drop incorrect `const`ness
Edward Thomson f28bae0c 2016-02-15T17:16:00 rebase: persist a single in-memory index When performing an in-memory rebase, keep a single index for the duration, so that callers have the expected index lifecycle and do not hold on to an index that is free'd out from under them.
Edward Thomson 35439f59 2016-02-11T12:24:21 win32: introduce p_timeval that isn't stupid Windows defines `timeval` with `long`, which we cannot sanely cope with. Instead, use a custom timeval struct.