summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* | refs::create: strict object creation on by defaultEdward Thomson2016-04-111-5/+5
| | | | | | | | | | | | | | | | 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.
* | reset: use real ids for the testsCarlos Martín Nieto2016-04-111-3/+3
|/ | | | This lets us run with strict object creation on.
* tests: fix core/stream test when built with openssl offAndreas Henriksson2016-04-061-2/+6
| | | | | | | | | | | | | 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.
* Merge pull request #3724 from ethomson/submodule_start_supports_silly_slashesCarlos Martín Nieto2016-04-022-6/+59
|\ | | | | iterator/diff: allow trailing `/` on start/end paths to match submodules
| * iterator: support trailing `/` in start for submodEdward Thomson2016-04-021-6/+12
| | | | | | | | | | | | 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.
| * diff: test submodules are found with trailing `/`Edward Thomson2016-04-021-0/+47
| | | | | | | | | | Test that submodules are found when the are included in a pathspec but have a trailing slash.
* | ignore: don't use realpath to canonicalize pathcmn/ignore-symlinkCarlos Martín Nieto2016-04-021-0/+13
|/ | | | | | 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.
* Merge pull request #3719 from libgit2/ethomson/submodule_statusCarlos Martín Nieto2016-04-01230-0/+422
|\ | | | | WD iterator: properly identify submodules
| * status: test submodules with mixed caseEdward Thomson2016-03-31230-0/+422
| |
* | leaks: fix some leaks in the testsEdward Thomson2016-03-315-2/+19
| |
* | Plug a few leaksCarlos Martín Nieto2016-03-311-0/+2
|/
* Merge pull request #3712 from ethomson/config_duplicate_sectionCarlos Martín Nieto2016-03-291-0/+24
|\ | | | | config: don't write duplicate section
| * config::write::repeated: init our bufferEdward Thomson2016-03-281-1/+1
| |
| * config: show we write a spurious duplicated section headerCarlos Martín Nieto2016-03-281-0/+24
| | | | | | | | | | 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.
* | Merge pull request #3703 from libgit2/cmn/multivar-set-lockedEdward Thomson2016-03-281-1/+1
|\ \ | |/ |/| config: don't special-case multivars that don't exist yet
| * config: don't special-case multivars that don't exist yetcmn/multivar-set-lockedCarlos Martín Nieto2016-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | 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.
* | iterator: new workdir-iterator test for pathlist + includings treesMarc Strapetz2016-03-241-0/+26
| |
* | iterator: new index-iterator test for pathlist + includings treesMarc Strapetz2016-03-241-0/+31
| |
* | iterator: more pathlist-related tests should test actual pathsMarc Strapetz2016-03-242-6/+23
| |
* | iterator: don't run the gunk test by default on CIEdward Thomson2016-03-241-1/+1
| | | | | | | | (It's slow!)
* | iterator: refactor index iteratorEdward Thomson2016-03-244-58/+688
| |
* | Introduce `git_path_common_dirlen`Edward Thomson2016-03-241-0/+20
| |
* | iterator: give the tests a proper hierarchyEdward Thomson2016-03-247-3332/+3375
| | | | | | | | | | | | 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.
* | Added clar test for #3568Jeff Hostetler2016-03-231-0/+129
| |
* | iterator: test that we can `advance_into` empty dirsEdward Thomson2016-03-231-0/+59
| | | | | | | | | | | | 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.
* | Failing test.joshaber2016-03-231-10/+53
| |
* | iterator: test pathlist handling for directoriesMarc Strapetz2016-03-232-0/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | iterator: test `advance_over` with a pathlistEdward Thomson2016-03-231-0/+60
| |
* | iterator: add tests for advance_overEdward Thomson2016-03-231-0/+77
| | | | | | | | | | `git_iterator_advance_over` is a gnarly bit of code with no actual tests.
* | iterator: test workdir pathlist with deep pathsEdward Thomson2016-03-231-0/+159
| | | | | | | | | | | | | | | | 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.
* | iterator: workdir tests with submodulesEdward Thomson2016-03-231-0/+80
| | | | | | | | | | Ensure that when specifying start/end paths, or pathlists, that we deal correctly with submodules.
* | iterator: expand workdir tests with pathlistEdward Thomson2016-03-231-62/+224
| | | | | | | | | | Expand the workdir tests to validate the paths in case sensitive and insensitive tests.