summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* remote: accept a repository and remote name for deletioncmn/remote-delete-nameCarlos Martín Nieto2014-09-301-18/+3
| | | | | | | | We don't need the remote loaded, and the function extracted both of these from the git_remote in order to do its work, so let's remote a step and not ask for the loaded remote at all. This fixes #2390.
* Merge pull request #2581 from jacquesg/stash-ignored-directoriesEdward Thomson2014-09-291-0/+17
|\ | | | | Stash ignored directories
| * Added test for stashing files in ignored directoriesJacques Germishuys2014-09-241-0/+17
| |
* | Merge pull request #2584 from jacquesg/pool-alignmentEdward Thomson2014-09-293-3/+3
|\ \ | | | | | | Pool/Index data is not aligned
| * | Silence unused return value warningJacques Germishuys2014-09-261-1/+1
| | |
| * | Fixed odb foreach test failure for big-endian 64-bitJakub Čajka2014-09-261-1/+1
| | |
| * | Fixed merge REUC test for big-endian 64-bitJakub Čajka2014-09-261-1/+1
| |/
* | Merge pull request #2559 from libgit2/cmn/free-tls-errorEdward Thomson2014-09-291-0/+14
|\ \ | |/ |/| global: free the error message when exiting a thread
| * global: free the error message when exiting a threadcmn/free-tls-errorCarlos Martín Nieto2014-09-141-0/+14
| | | | | | | | | | When we free the global state at thread termination, we must also free the error message in order not to leak the string once per thread.
* | Merge pull request #2567 from cirosantilli/factor-41Vicent Marti2014-09-176-13/+13
|\ \ | | | | | | Factor 40 and 41 constants from source.
| * | Factor 40 and 41 constants from source.Ciro Santilli2014-09-166-13/+13
| | |
* | | Merge pull request #2571 from libgit2/vmg/walk-up-pathVicent Marti2014-09-173-17/+45
|\ \ \ | | | | | | | | Fix `git_path_walk_up` to work with non-rooted paths
| * | | attr: Add an extra test for files under a subfolderThe rugged tests are fragile2014-09-171-0/+7
| | | |
| * | | path: Fix `git_path_walk_up` to work with non-rooted pathsThe rugged tests are fragile2014-09-172-17/+38
| | | |
* | | | Merge pull request #2572 from cirosantilli/factor-voidVicent Marti2014-09-171-2/+2
|\ \ \ \ | |/ / / |/| | | Replace void casts with GIT_UNUSED.
| * | | Replace void casts with GIT_UNUSED.Ciro Santilli2014-09-171-2/+2
| |/ /
* | | Merge pull request #2464 from libgit2/cmn/host-cert-infoVicent Marti2014-09-172-1/+83
|\ \ \ | | | | | | | | Provide a callback for certificate validation
| * | | ssh: skip the localhost cert check earliercmn/host-cert-infoCarlos Martín Nieto2014-09-161-2/+4
| | | | | | | | | | | | | | | | | | | | Skip it before we attempt to clone, as we would exit with -1 on systems which do not have sshd running.
| * | | ssh: expose both hashesCarlos Martín Nieto2014-09-161-4/+13
| | | | | | | | | | | | | | | | | | | | The user may have the data hashed as MD5 or SHA-1, so we should provide both types for consumption.
| * | | ssh: provide our own types for host key lengthsCarlos Martín Nieto2014-09-161-0/+2
| | | | | | | | | | | | | | | | | | | | Instead of using the libssh2 defines, provide our own, which eases usage as we do not need to check whether libgit2 was built with libssh2 or not.
| * | | net: use only structs to pass information about certCarlos Martín Nieto2014-09-161-13/+8
| | | | | | | | | | | | | | | | | | | | | | | | Instead of spreading the data in function arguments, some of which aren't used for ssh and having a struct only for ssh, use a struct for both, using a common parent to pass to the callback.
| * | | Merge remote-tracking branch 'upstream/master' into cmn/host-cert-infoCarlos Martín Nieto2014-09-1612-20/+372
| |\ \ \
| * | | | ssh: add test for host keyCarlos Martín Nieto2014-09-161-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | Test that the certificate check callback gets the right fingerprint from the host we're connecting to.
| * | | | winhttp: credential check on successful connectCarlos Martín Nieto2014-09-161-2/+4
| | | | | | | | | | | | | | | | | | | | On successful connection, still ask the user whether they accept the server's certificate, indicating that WinHTTP would let it though.
| * | | | Bring certificate check back to the normal return codeCarlos Martín Nieto2014-09-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Returning 0 lets the certificate check succeed. An error code is bubbled up to the user.
| * | | | ssh: do ssh cert info before asking for credentialsCarlos Martín Nieto2014-09-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | We know the host's key as soon as we connect, so we should perform the check as soon as we can, before we bother with the user's credentials.
| * | | | transport: always call the certificate check callbackCarlos Martín Nieto2014-09-161-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should let the user decide whether to cancel the connection or not regardless of whether our checks have decided that the certificate is fine. We provide our own assessment to the callback to let the user fall back to our checks if they so desire.
| * | | | remote: add tests for the certificate callbackCarlos Martín Nieto2014-09-161-0/+35
| | | | |
| * | | | Provide a callback for certificate validationCarlos Martín Nieto2014-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the certificate validation fails (or always in the case of ssh), let the user decide whether to allow the connection. The data structure passed to the user is the native certificate information from the underlying implementation, namely OpenSSL or WinHTTP.
* | | | | Clean up some leaks in the test suiteCarlos Martín Nieto2014-09-173-0/+4
| | | | |
* | | | | Merge pull request #2561 from jacquesg/merge-skipVicent Marti2014-09-161-0/+41
|\ \ \ \ \ | | | | | | | | | | | | No files merged may result in bogus merge conflict error
| * | | | | Added test case to illustrate bogus conflicts detected if no files were ↵Jacques Germishuys2014-09-121-0/+41
| | |_|/ / | |/| | | | | | | | | | | | | merged, and untracked files exist in the workdir.
* | | | | Fix attribute lookup in index for bare reposrb/attr-with-bareRussell Belfer2014-09-151-0/+36
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using a bare repo with an index, libgit2 attempts to read files from the index. It caches those files based on the path to the file, specifically the path to the directory that contains the file. If there is no working directory, we use `git_path_dirname_r` to get the path to the containing directory. However, for the `.gitattributes` file in the root of the repository, this ends up normalizing the containing path to `"."` instead of the empty string and the lookup the `.gitattributes` data fails. This adds a test of attribute lookups on bare repos and also fixes the problem by simply rewriting `"."` to be `""`.
* | | | Merge pull request #2554 from linquize/fetch-head-tagVicent Marti2014-09-152-0/+27
|\ \ \ \ | |/ / / |/| | | When auto follow tags, FETCH_HEAD should list only newly followed tags
| * | | When auto follow tags, FETCH_HEAD should list only newly followed tagsLinquize2014-09-062-0/+27
| |/ /
* | | signature: don't allow empty emailscmn/signature-empty-emailCarlos Martín Nieto2014-09-101-2/+2
| |/ |/| | | | | | | | | A signature is made up of a non-empty name and a non-empty email so let's validate that. This also brings us more in line with git, which also rejects ident with an empty email.
* | Merge pull request #2511 from libgit2/cmn/remote-default-restrictVicent Marti2014-09-092-0/+108
|\ \ | | | | | | Restrict which refs can be the default branch
| * | clone: handle overly restrictive refspecscmn/remote-default-restrictCarlos Martín Nieto2014-09-021-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the fetch refspec does not include the remote's default branch, it indicates an error in user expectations or programmer error. Error out in that case. This lets us get rid of the dummy refspec which can never work as its zeroed out. In the cases where we did not find a default branch, we set HEAD detached immediately, which lets us refactor the "normal" path, removing `found_branch`.
| * | clone: correct handling of an unborn HEADCarlos Martín Nieto2014-09-021-0/+15
| | | | | | | | | | | | | | | If the remote does not advertise HEAD, then it is unborn and we cannot checkout that branch. Handle it the same way as an empty repo.
| * | remote: add test for single-branch cloneCarlos Martín Nieto2014-09-021-0/+61
| | | | | | | | | | | | | | | When cloning, we may be asking for a particular branch or subset of branches. Make sure we test for that.
| * | remote: add tests for remote-branch edge casesCarlos Martín Nieto2014-09-021-0/+29
| | | | | | | | | | | | | | | | | | Add tests for the case when there are no branches on the remote and when HEAD is detached but has the id of a non-branch. In both of these cases, we should return ENOTFOUND.
| * | remote: assert what we want to happen when ther is no default branchCarlos Martín Nieto2014-08-291-0/+14
| |/ | | | | | | Assert what we already do, so as to notice changes.
* | Merge pull request #2543 from libgit2/cmn/known-transportsVicent Marti2014-09-031-16/+14
|\ \ | | | | | | Clean up transport lookup
| * | remote: test for supported URLs in a single placeCarlos Martín Nieto2014-08-311-16/+9
| | | | | | | | | | | | | | | Instead of using ifdefs to run the tests, use them to set when we expect to support a particular scheme and always have the tests in the code.
| * | remote: get rid of git_remote_valid_url()Carlos Martín Nieto2014-08-311-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | It does the same as git_remote_supported_url() but has a name which implies we'd check the URL for correctness while we're simply looking at the scheme and looking it up in our lists. While here, fix up the tests so we check all the combination of what's supported.
* | | Introduce option to use relative paths for repository work directoryjamill/relative_gitlinkJameson Miller2014-09-023-0/+138
| | | | | | | | | | | | | | | | | | | | | Teach git_repository_init_ext to use relative paths for the gitlink to the work directory. This is used when creating a sub repository where the sub repository resides in the parent repository's .git directory.
* | | Introduce git_path_make_relativeEdward Thomson2014-09-021-0/+55
| | |
* | | Merge pull request #2545 from linquize/no-sshVicent Marti2014-09-031-0/+9
|\ \ \ | |/ / |/| | Skip SSH clone tests if libgit2 not built with GIT_SSH defined
| * | Skip SSH clone tests if libgit2 not built with GIT_SSH definedLinquize2014-09-011-0/+9
| |/
* | MSVC does not support zero size arrayLinquize2014-08-311-2/+1
| |