tests


Log

Author Commit Date CI Message
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
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.
Carlos Martín Nieto 5a296ad0 2016-02-12T00:55:20 Merge pull request #3610 from ethomson/rebase_bare rebase: introduce bare rebasing
Arthur Schreiber 3679ebae 2016-02-11T23:37:52 Horrible fix for #3173.
Carlos Martín Nieto 460ae11f 2016-02-11T22:19:20 commit: don't forget the last header field When we moved the logic to handle the first one, wrong loop logic was kept in place which meant we still finished early. But we now notice it because we're not reading past the last LF we find. This was not noticed before as the last field in the tested commit was multi-line which does not trigger the early break.
Edward Thomson 263e674e 2016-02-11T11:41:23 merge tests: correct casts
Edward Thomson ad8aa112 2016-02-11T11:26:42 reset test: fix initialization warning
Edward Thomson a202e0d4 2016-02-11T10:11:21 rebase: allow custom merge_options Allow callers of rebase to specify custom merge options. This may allow custom conflict resolution, or failing fast when conflicts are detected.
Edward Thomson ee667307 2016-02-11T10:48:48 rebase: introduce inmemory rebasing Introduce the ability to rebase in-memory or in a bare repository. When `rebase_options.inmemory` is specified, the resultant `git_rebase` session will not be persisted to disk. Callers may still analyze the rebase operations, resolve any conflicts against the in-memory index and create the commits. Neither `HEAD` nor the working directory will be updated during this process.
Vicent Marti 488e2b85 2016-02-09T16:26:58 Merge pull request #3599 from libgit2/gpgsign Introduce git_commit_extract_signature
Carlos Martín Nieto a65afb75 2016-02-08T18:51:13 Introduce git_commit_extract_signature This returns the GPG signature for a commit and its contents without the signature block, allowing for the verification of the commit's signature.
Carlos Martín Nieto f55eca16 2016-02-09T07:17:26 commit: also match the first header field when searching We were searching only past the first header field, which meant we were unable to find e.g. `tree` which is the first field. While here, make sure to set an error message in case we cannot find the field.
Ross Delinger ed0571f8 2016-01-12T16:08:38 Add a new build flag to disable the pool allocator and pass all git_pool_malloc calls straight to git__malloc
Chris Bargren 1cc7f544 2015-12-28T11:35:19 Adding test cases that actually test the functionality of the new transport ssh, ssh+git and git+ssh should all successfully build an SSH transport
Edward Thomson 62602547 2015-12-26T22:39:22 git_repository_init: include dotfiles when copying templates Include dotfiles when copying template directory, which will handle both a template directory itself that begins with a dotfile, and any dotfiles inside the directory.
Edward Thomson 00282183 2015-12-26T22:32:17 repo::init tests: test a template dir with leading dot Ensure that we can handle template directories that begin with a leading dot.
Edward Thomson 5c042c5b 2015-12-26T22:06:45 repo::init tests: test init.templatedir setting Ensure that `git_repository_init` honors the `init.templatedir` configuration setting.
Chris Bargren 0c1f5672 2015-12-22T10:56:38 Adding spec coverage for ssh+git and git+ssh protocols
Dmitriy Olshevskiy 91f0d186 2015-12-21T20:49:14 typos in comments
Vicent Marti 5951445f 2015-12-17T10:13:04 commit: Fix memory leak in test suite
Edward Thomson 30c8e260 2015-12-14T13:53:26 Merge pull request #3521 from pks-t/blame-line-overflow Line count overflow in git_blame_hunk and git_blame__entry
Carlos Martín Nieto 6aa06b65 2015-12-10T12:14:09 Merge pull request #3522 from pks-t/email-format-commit-message diff: include commit message when formatting patch
Carlos Martín Nieto 465c3b38 2015-12-09T19:16:11 reset: perform the checkout before moving HEAD or the index This keeps the state of the workdir the same as one from HEAD, removing a source of possible confusion when calculating the work that is to be done.
Michał Górny 326c9fc2 2015-12-01T20:41:23 checkout test: Apply umask to file-mode test as well Fix the file-mode test to expect system umask being applied to the created file as well (it is currently applied to the directory only). This fixes the test on systems where umask != 022. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Patrick Steinhardt 254e0a33 2015-11-24T13:43:43 diff: include commit message when formatting patch When formatting a patch as email we do not include the commit's message in the formatted patch output. Implement this and add a test that verifies behavior.
Patrick Steinhardt 7f8fe1d4 2015-12-01T10:03:56 commit: introduce `git_commit_body` It is already possible to get a commit's summary with the `git_commit_summary` function. It is not possible to get the remaining part of the commit message, that is the commit message's body. Fix this by introducing a new function `git_commit_body`.
Patrick Steinhardt cb1cb24c 2015-11-24T10:18:58 blame: use size_t for line counts in git_blame_hunk It is not unreasonable to have versioned files with a line count exceeding 2^16. Upon blaming such files we fail to correctly keep track of the lines as `git_blame_hunk` stores them in `uint16_t` fields. Fix this by converting the line fields of `git_blame_hunk` to `size_t`. Add test to verify behavior.
Patrick Steinhardt a7bd157e 2015-11-30T17:40:49 tests: fix warning for nested struct initialization
Carlos Martín Nieto a27f31d8 2015-11-30T04:49:31 Merge pull request #3513 from ethomson/merge_recursive Recursive Merge
Edward Thomson 5b9c63c3 2015-11-20T19:01:42 recursive merge: add a recursion limit
Edward Thomson 78859c63 2015-11-20T17:33:49 merge: handle conflicts in recursive base building When building a recursive merge base, allow conflicts to occur. Use the file (with conflict markers) as the common ancestor. The user has already seen and dealt with this conflict by virtue of having a criss-cross merge. If they resolved this conflict identically in both branches, then there will be no conflict in the result. This is the best case scenario. If they did not resolve the conflict identically in the two branches, then we will generate a new conflict. If the user is simply using standard conflict output then the results will be fairly sensible. But if the user is using a mergetool or using diff3 output, then the common ancestor will be a conflict file (itself with diff3 output, haha!). This is quite terrible, but it matches git's behavior.
Edward Thomson 34a51428 2015-11-09T11:55:26 merge tests: add complex recursive example
Edward Thomson 651bfd69 2015-11-09T08:24:47 recursive: test conflict output during recursive merge
Edward Thomson dcde5720 2015-11-09T08:23:27 merge tests: move expected data into own file
Edward Thomson b1eef912 2015-10-27T18:00:30 merge: add recursive test with conflicting contents
Edward Thomson fccad82e 2015-10-27T14:23:35 merge: add recursive test with three merge bases
Edward Thomson 99d9d9a4 2015-10-26T17:44:36 merge: improve test names in recursive merge tests
Edward Thomson a200bcf7 2015-10-26T17:25:42 merge: add a third-level recursive merge
Edward Thomson cdb6c1c8 2015-10-26T17:14:28 merge: add a second-level recursive merge
Edward Thomson 86c8d02c 2015-10-22T20:20:07 merge: add simple recursive test Add a simple recursive test - where multiple ancestors exist and creating a virtual merge base from them would prevent a conflict.
Edward Thomson fa78782f 2015-10-22T17:00:09 merge: rename `git_merge_tree_flags_t` -> `git_merge_flags_t`
Patrick Steinhardt 77b79dde 2015-11-24T14:36:46 tests: win32::longpath: free expected_msg
Patrick Steinhardt 9031be18 2015-11-24T14:38:17 tests: config::stress: free `git_config` structs
Patrick Steinhardt c8fab201 2015-11-24T14:29:32 tests: config::global: fix memleak in open_programdata
Edward Thomson c4f60543 2015-11-20T17:57:04 Merge pull request #3517 from jacquesg/warnings-fixes Fix some warnings
Jacques Germishuys 87428c55 2015-11-20T20:48:51 Fix some warnings
Carlos Martín Nieto 2ea40fda 2015-11-20T13:19:23 repository: distinguish sequencer cherry-pick and revert These are not quite like their plain counterparts and require special handling.
Carlos Martín Nieto 69d14948 2015-11-17T13:21:18 Merge pull request #3511 from ethomson/racy_fixes_2 Racy fixes for writing new indexes
Edward Thomson 88638f9b 2015-11-17T11:22:01 tests: use out-of-the-way config dir in sandbox Don't put the configuration in a subdir of the sandbox named `config`, lest some tests decide to create their own directory called `config`. Prefix with some underscores for uniqueness.
Edward Thomson fe963748 2015-11-16T23:34:26 tests: set PROGRAMDATA directory for running tests
Edward Thomson 6f7c4118 2015-11-17T08:38:46 config::global: use PROGRAMDATA configuration Query the `GIT_CONFIG_LEVEL_PROGRAMDATA` location when setting it up for tests, in case the test runner has sandboxed it.
Edward Thomson 5f32c506 2015-11-16T18:06:52 racy: make git_index_read_index handle raciness Ensure that `git_index_read_index` clears the uptodate bit on files that it modifies. Further, do not propagate the cache from an on-disk index into another on-disk index. Although this should not be done, as `git_index_read_index` is used to bring an in-memory index into another index (that may or may not be on-disk), ensure that we do not accidentally bring in these bits when misused.
Edward Thomson c30051f0 2015-11-16T18:05:46 racy: ensure git_index_read_tree clears uptodate Ensure that `git_index_read_tree` clears the uptodate bit on files that it modifies.
Edward Thomson 956f4da8 2015-11-13T16:30:39 index: test for smudged entries on write only Test that entries are only smudged when we write the index: the entry smudging is to prevent us from updating an index in a way that it would be impossible to tell that an item was racy. Consider when we load an index: any entries that have the same (or newer) timestamp than the index itself are considered racy, and are subject to further scrutiny. If we *save* that index with the same entries that we loaded, then the index would now have a newer timestamp than the entries, and they would no longer be given that additional scrutiny, failing our racy detection! So test that we smudge those entries only on writing the new index, but that we can detect them (in diff) without having to write.
Edward Thomson de999f26 2015-11-13T15:36:45 checkout::crlf test: don't crash when no idx entry When there's no matching index entry (for whatever reason), don't try to dereference the null return value to get at the id. Otherwise when we break something in the index API, the checkout test crashes for confusing reasons and causes us to step through it in a debugger thinking that we had broken much more than we actually did.
Edward Thomson d1101263 2015-11-13T15:32:48 index: don't detect raciness in uptodate entries Keep track of entries that we believe are up-to-date, because we added the index entries since the index was loaded. This prevents us from unnecessarily examining files that we wrote during the cleanup of racy entries (when we smudge racily clean files that have a timestamp newer than or equal to the index's timestamp when we read it). Without keeping track of this, we would examine every file that we just checked out for raciness, since all their timestamps would be newer than the index's timestamp.
Vicent Marti 7ff7ca62 2015-11-12T20:51:01 pool: Never return unaligned buffers
Carlos Martín Nieto 75a0ccf5 2015-11-12T19:53:09 Merge pull request #3170 from CmdrMoozy/nsec_fix git_index_entry__init_from_stat: set nsec fields in entry stats
Carlos Martín Nieto 2c26c867 2015-11-12T19:22:31 Merge pull request #3499 from ethomson/ref_dir_errmsgs Improve error messages when dirs prevent ref/reflog creation
Carlos Martín Nieto ecdc0428 2015-11-12T19:20:36 Merge pull request #3448 from libgit2/cmn/custom-agent Support setting custom user-agent
Carlos Martín Nieto de870533 2015-10-02T03:43:11 settings: add a setter for a custom user-agent
Edward Thomson 0a700ee3 2015-11-03T17:34:54 reflog: error when a directory is at reflog path When a non-empty directory exists and prevents the creation of a reflog, provide a more informative error message.
Edward Thomson b46c7ee5 2015-11-03T17:18:00 refs: complain when a directory exists at ref When a (non-empty) directory exists at the reference target location, complain with a more actionable error message.
nulltoken 1314af8d 2014-08-26T13:51:37 Failing test for case sensitive conflicts in the index
Carlos Martín Nieto 1c34b717 2015-11-08T05:10:18 Merge pull request #3498 from ethomson/windows_symlinks Diff: Honor `core.symlinks=false` and fake symlinks