summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * apply: move patch data to patch_common.hEdward Thomson2016-05-263-2/+2
| |
| * patch: abstract patches into diff'ed and parsedEdward Thomson2016-05-261-0/+1
| | | | | | | | | | | | Patches can now come from a variety of sources - either internally generated (from diffing two commits) or as the results of parsing some external data.
| * patch parsing: ensure empty patches are illegalEdward Thomson2016-05-261-0/+8
| |
| * patch parsing: parse binary patch filesEdward Thomson2016-05-261-55/+123
| |
| * zstream: fail when asked to inflate garbageEdward Thomson2016-05-261-0/+19
| | | | | | | | | | | | | | | | When we are provided some input buffer (with a length) to inflate, and it contains more data than simply the deflated data, fail. zlib will helpfully tell us when it is done reading (via Z_STREAM_END), so if there is data leftover in the input buffer, fail lest we continually try to inflate it.
| * git_buf: decode base85 inputsEdward Thomson2016-05-261-0/+36
| |
| * patch application: apply binary patchesEdward Thomson2016-05-263-11/+242
| | | | | | | | | | | | Handle the application of binary patches. Include tests that produce a binary patch (an in-memory `git_patch` object), then enusre that the patch applies correctly.
| * zstream: offer inflating, `git_zstream_inflatebuf`Edward Thomson2016-05-261-5/+11
| | | | | | | | Introduce `git_zstream_inflatebuf` for simple uses.
| * apply: handle empty patchesEdward Thomson2016-05-261-0/+8
| | | | | | | | When a patch is empty, simply copy the source into the destination.
| * Patch parsing from patch filesEdward Thomson2016-05-263-0/+547
| |
| * Introduce git_apply_patchEdward Thomson2016-05-262-0/+462
| | | | | | | | | | The beginnings of patch application from an existing (diff-created) git_patch object: applies the hunks of a git_patch to a buffer.
* | Remove unused static functionsPatrick Steinhardt2016-06-211-10/+0
| |
* | Avoid old-style function definitionsPatrick Steinhardt2016-06-211-2/+2
| | | | | | | | | | | | Avoid declaring old-style functions without any parameters. Functions not accepting any parameters should be declared with `void fn(void)`. See ISO C89 $3.5.4.3.
* | threads: split up OS-dependent thread codePatrick Steinhardt2016-06-203-6/+6
| |
* | checkout: use empty baseline when no indexethomson/checkout_no_indexEdward Thomson2016-06-151-0/+63
| | | | | | | | | | When no index file exists and a baseline is not explicitly provided, use an empty baseline instead of trying to load `HEAD`.
* | tests: fix memory leaks in checkout::typechangePatrick Steinhardt2016-06-071-2/+2
| |
* | rebase: test rebasing a new commit with subfolderEdward Thomson2016-06-028-0/+83
| | | | | | | | | | Test a rebase (both a merge rebase and an inmemory rebase) with a new commit that adds files underneath a new subfolder.
* | test: ensure we can round-trip a written treeEdward Thomson2016-06-021-0/+23
| | | | | | | | | | Read a tree into an index, write the index, then re-open the index and ensure that we are treesame to the original.
* | round-trip trees through index_read_indexEdward Thomson2016-06-021-0/+32
| | | | | | | | | | | | | | Read a tree into an index using `git_index_read_index` (by reading a tree into a new index, then reading that index into the current index), then write the index back out, ensuring that our new index is treesame to the tree that we read.
* | cleanup: unused warningEdward Thomson2016-06-011-0/+3
|/
* Merge pull request #3798 from mmuman/stat-test-fixEdward Thomson2016-05-261-2/+3
|\ | | | | test: Fix stat() test to mask out unwanted bits
| * test: Fix stat() test to mask out unwanted bitsFrançois Revol2016-05-241-2/+3
| | | | | | | | Haiku and Hurd both pass extra bits in struct stat::st_mode.
* | checkout: handle dirty submodules correctlyJason Haslam2016-05-261-8/+74
|/ | | | | Don't generate conflicts when checking out a modified submodule and the submodule is dirty or modified in the workdir.
* tree: handle removal of all entries in the updatercmn/remove-single-entryCarlos Martín Nieto2016-05-241-0/+32
| | | | | When we remove all entries in a tree, we should remove that tree from its parent rather than include the empty tree.
* tree: plug leaks in the tree updatercmn/tree-update-basenameCarlos Martín Nieto2016-05-191-1/+2
|
* tree: use testrepo2 for the tree updater testsCarlos Martín Nieto2016-05-191-9/+38
| | | | This gives us trees with subdirectories, which the new test needs.
* Introduce a function to create a tree based on a different onecmn/tree-updateCarlos Martín Nieto2016-05-171-0/+167
| | | | | | | | | | | Instead of going through the usual steps of reading a tree recursively into an index, modifying it and writing it back out as a tree, introduce a function to perform simple updates more efficiently. `git_tree_create_updated` avoids reading trees which are not modified and supports upsert and delete operations. It is not as versatile as modifying the index, but it makes some common operations much more efficient.
* Merge pull request #3757 from johnhaley81/jh/fix-create-initial-commitCarlos Martín Nieto2016-05-061-0/+60
|\ | | | | Fix `git_commit_create` for an initial commit
| * Fix initial commit testJohn Haley2016-05-041-30/+5
| | | | | | | | | | | | `test_commit_commit__create_initial_commit_parent_not_current` was not correctly testing that `HEAD` was not changed. Now we grab the oid that it was pointing to before the call to `git_commit_create` and the oid that it's pointing to afterwards and compare those.
| * Add tests for creating an initial commitJohn Haley2016-05-031-0/+85
| |
* | rebase: test rebase (merge) w/ no common ancestorEdward Thomson2016-05-032-5/+104
|/
* Introduce `git_signature_from_buffer`ethomson/signature_from_bufferEdward Thomson2016-04-281-0/+13
| | | | | Allow users to construct a signature from the type of signature lines that actually appear in commits.
* rebase::abort: test we can abort rebase by revspecEdward Thomson2016-04-261-0/+19
| | | | | Test that we can properly abort a rebase when it is initialized by a revspec. This ensures that we do not conflate revspecs and refnames.
* Merge pull request #3749 from arthurschreiber/arthur/add-git-reference-dupCarlos Martín Nieto2016-04-261-0/+40
|\ | | | | Allow creating copies of `git_reference` objects.
| * Allow creating copies of `git_reference` objects.Arthur Schreiber2016-04-221-0/+40
| |
* | Merge pull request #3748 from libgit2/ethomson/rebase_detachedCarlos Martín Nieto2016-04-262-5/+115
|\ \ | | | | | | Rebase improvements with IDs
| * | rebase: correctly finish rebasing detached headsethomson/rebase_detachedEdward Thomson2016-04-211-0/+50
| | | | | | | | | | | | | | | When rebasing with IDs, we do not return to the `branch`, we remain in a detached HEAD state.
| * | rebase: test abort immediately after initEdward Thomson2016-04-211-5/+65
| |/ | | | | | | | | Instead of `open`ing a rebase and `abort`ing that, test that we can `abort` a rebase that has just begun with `init`.
* | tag: ignore extra header fieldscmn/silly-tagsCarlos Martín Nieto2016-04-251-0/+37
| | | | | | | | | | | | | | While no extra header fields are defined for tags, git accepts them by ignoring them and continuing the search for the message. There are a few tags like this in the wild which git parses just fine, so we should do the same.
* | clone test: annotate unused varsEdward Thomson2016-04-211-1/+3
|/
* Merge pull request #3110 from libgit2/cmn/proxy-configEdward Thomson2016-04-197-17/+70
|\ | | | | Proxy configuration
| * proxy: don't specify the protocol in the typeCarlos Martín Nieto2016-04-191-2/+2
| | | | | | | | | | | | We leave this up to the scheme in the url field. The type should only tell us about whether we want a proxy and whether we want to auto-detect it.
| * netops: make the path optional in URLsCarlos Martín Nieto2016-04-191-0/+9
| | | | | | | | | | | | When we're dealing with proxy addresses, we only want a hostname and port, and the user would not provide a path, so make it optional so we can use this same function to parse git as well as proxy URLs.
| * proxy: use poxy to test our Windows proxy supportCarlos Martín Nieto2016-04-191-1/+0
| |
| * proxy: ask the user for credentials if necessaryCarlos Martín Nieto2016-04-196-17/+62
| |
* | ignore: fix directory limits when searching for star-starCarlos Martín Nieto2016-04-191-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | In order to match the star-star, we disable the flag that's looking for a single path element, but that leads to searching for the pattern in the middle of elements in the input string. Mark when we're handing a star-star so we jump over the elements in our attempt to match the part of the pattern that comes after the star-star. While here, tighten up the check so we don't allow invalid rules through.
* | Add more tests for path matching with globs and path delimitersAntonio Scandurra2016-04-181-0/+14
|/
* tests: skip the unreadable file tests as rootEdward Thomson2016-04-112-0/+8
| | | | | | 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.
* Merge pull request #3736 from libgit2/cmn/dwim-general-messageEdward Thomson2016-04-111-0/+8
|\ | | | | refs: provide a more general error message for dwim
| * refs: provide a more general error message for dwimcmn/dwim-general-messageCarlos Martín Nieto2016-04-111-0/+8
| | | | | | | | | | | | | | 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.