summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* merge driver: test GIT_PASSTHROUGHEdward Thomson2016-03-171-0/+95
| | | | | When a `check` or `apply` callback function returns `GIT_PASSTHROUGH`, move on to the default merge driver.
* merge driver: introduce custom merge driversEdward Thomson2016-03-171-0/+208
| | | | | | | | 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.
* Fix rebase bug and include test for merge=unionStan Hu2016-03-171-0/+36
|
* Merge pull request #3673 from libgit2/cmn/commit-with-signatureEdward Thomson2016-03-171-0/+100
|\ | | | | commit: add function to attach a signature to a commit
| * commit: add function to attach a signature to a commitcmn/commit-with-signatureCarlos Martín Nieto2016-03-151-0/+100
| | | | | | | | | | In combination with the function which creates a commit into a buffer, this allows us to more easily create signed commits.
* | Merge pull request #3685 from pks-t/pks/memleaksEdward Thomson2016-03-172-20/+19
|\ \ | | | | | | Test memleaks
| * | tests: transport: fix memory leaks with registering transportsPatrick Steinhardt2016-03-111-18/+17
| | |
| * | tests: nsec: correctly free nsec_pathPatrick Steinhardt2016-03-111-2/+2
| |/ | | | | | | | | | | 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.
* | commit: fix extraction of single-line signaturescmn/extract-oneline-sigCarlos Martín Nieto2016-03-171-0/+24
| | | | | | | | | | | | | | | | 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.
* | Use general cl_git_fail because the error is genericDirkjan Bussink2016-03-141-2/+1
| |
* | Setup better defaults for OpenSSL ciphersDirkjan Bussink2016-03-141-0/+9
|/ | | | | | | | | 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
* Merge pull request #3623 from ethomson/rebase_with_commitCarlos Martín Nieto2016-03-093-5/+288
|\ | | | | rebase: additional setup tests of exotic behavior
| * rebase: additional tests for completing a rebaseEdward Thomson2016-02-282-5/+83
| |
| * rebase: additional setup tests of exotic behaviorEdward Thomson2016-02-171-0/+205
| | | | | | | | | | | | | | 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.
* | odb: Handle corner cases in `git_odb_expand_ids`Vicent Marti2016-03-091-0/+9
| | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #3656 from ethomson/exists_prefixesVicent Marti2016-03-081-0/+146
|\ \ | | | | | | Introduce `git_odb_expand_ids`
| * | git_odb_expand_ids: accept git_odb_expand_id arrayEdward Thomson2016-03-081-50/+45
| | | | | | | | | | | | Take (and write to) an array of a struct, `git_odb_expand_id`.
| * | git_odb_expand_ids: rename func, return the typeEdward Thomson2016-03-081-21/+31
| | |
| * | git_odb_exists_many_prefixes: query odb for multiple short idsEdward Thomson2016-03-071-0/+141
| | | | | | | | | | | | | | | Query the object database for multiple objects at a time, given their object ID (which may be abbreviated) and optional type.
* | | Merge pull request #3555 from cbargren/ssh-git-protocolsEdward Thomson2016-03-081-0/+10
|\ \ \ | | | | | | | | Support for ssh+git and git+ssh protocols
| * | | Adding test cases that actually test the functionality of the new transportChris Bargren2015-12-281-0/+6
| | | | | | | | | | | | ssh, ssh+git and git+ssh should all successfully build an SSH transport
| * | | Adding spec coverage for ssh+git and git+ssh protocolsChris Bargren2015-12-221-0/+4
| | | |
* | | | Merge pull request #3652 from libgit2/cmn/commit-to-memoryEdward Thomson2016-03-081-0/+39
|\ \ \ \ | | | | | | | | | | commit: split creating the commit and writing it out
| * | | | commit: split creating the commit and writing it outcmn/commit-to-memoryCarlos Martín Nieto2016-03-081-0/+39
| | |/ / | |/| | | | | | | | | | | | | | | | | | 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.
* | | | Merge pull request #3655 from ethomson/nanosecond_defaultsCarlos Martín Nieto2016-03-083-30/+65
|\ \ \ \ | |/ / / |/| | | Enable nanosecond resolution by default
| * | | index::racy: force racy entryEdward Thomson2016-03-081-19/+12
| | | | | | | | | | | | | | | | | | | | Instead of hoping that we can get a racy entry by going real fast and praying real hard, just create a racy entry.
| * | | index::nsec: don't expect shit filesystems to not suckEdward Thomson2016-03-071-9/+51
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | merge::workdir::dirty: update to use `st_ctime_nsec`Edward Thomson2016-03-071-2/+2
| | | | | | | | | | | | | | | | | | | | Update unit test to use newfangled `st_ctime_nsec`, which provides indirection to the platform-correct name.
* | | | treebuilder: don't try to verify submodules exist in the odbcmn/treebuilder-submoduleCarlos Martín Nieto2016-03-041-0/+12
|/ / / | | | | | | | | | | | | | | | | | | | | | 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.
* | | tests: take the version from our defineCarlos Martín Nieto2016-03-031-1/+1
| | |
* | | tests: plug a leakCarlos Martín Nieto2016-03-031-0/+1
| | |
* | | turn on strict object validation by defaultEdward Thomson2016-02-283-28/+28
| | |
* | | tests: use legitimate object idsEdward Thomson2016-02-2812-44/+57
| | | | | | | | | | | | | | | Use legitimate (existing) object IDs in tests so that we have the ability to turn on strict object validation when running tests.
* | | refs: honor strict object creationEdward Thomson2016-02-281-2/+24
| | |
* | | git_index_add: validate objects in index entries (optionally)Edward Thomson2016-02-281-0/+84
| | | | | | | | | | | | | | | When `GIT_OPT_ENABLE_STRICT_OBJECT_CREATION` is turned on, validate the index entries given to `git_index_add`.
* | | treebuilder: validate tree entries (optionally)Edward Thomson2016-02-281-0/+55
| | | | | | | | | | | | | | | When `GIT_OPT_ENABLE_STRICT_OBJECT_CREATION` is turned on, validate the tree and parent ids given to treebuilder insertion.
* | | git_commit: validate tree and parent idsEdward Thomson2016-02-281-5/+106
| | | | | | | | | | | | | | | When `GIT_OPT_ENABLE_STRICT_OBJECT_CREATION` is turned on, validate the tree and parent ids given to commit creation functions.
* | | Merge pull request #3577 from rossdylan/rossdylan/pooldebugEdward Thomson2016-02-281-0/+6
|\ \ \ | | | | | | | | Add a new build flag to disable the pool allocator
| * | | Add a new build flag to disable the pool allocator and pass all ↵Ross Delinger2016-01-121-0/+6
| | | | | | | | | | | | | | | | git_pool_malloc calls straight to git__malloc
* | | | nsec: update staging test for GIT_USE_NSECSEdward Thomson2016-02-251-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | git_libgit2_opts: validate keyEdward Thomson2016-02-221-0/+6
| | | |
* | | | Merge pull request #3613 from ethomson/fixupsCarlos Martín Nieto2016-02-187-11/+11
|\ \ \ \ | | | | | | | | | | Remove most of the silly warnings
| * | | | win32: drop incorrect `const`nessEdward Thomson2016-02-161-1/+1
| | | | |
| * | | | win32: introduce p_timeval that isn't stupidEdward Thomson2016-02-125-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Windows defines `timeval` with `long`, which we cannot sanely cope with. Instead, use a custom timeval struct.
| * | | | merge tests: correct castsEdward Thomson2016-02-111-3/+3
| | | | |
| * | | | reset test: fix initialization warningEdward Thomson2016-02-111-1/+1
| | | | |
* | | | | Merge pull request #3619 from ethomson/win32_forbiddenCarlos Martín Nieto2016-02-1814-6/+212
|\ \ \ \ \ | | | | | | | | | | | | win32: allow us to read indexes with forbidden paths on win32
| * | | | | index: allow read of index w/ illegal entriesEdward Thomson2016-02-171-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`).
| * | | | | win32: tests around handling forbidden pathsEdward Thomson2016-02-1713-0/+206
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | commit: expose the different kinds of errorsCarlos Martín Nieto2016-02-161-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.