summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* repository: Do not double-free configvmg/walk-up-pathThe rugged tests are fragile2014-09-171-8/+8
|
* StyleThe rugged tests are fragile2014-09-171-3/+2
|
* attr: Do not walk path if we're at the rootThe rugged tests are fragile2014-09-171-5/+8
|
* 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-177-28/+64
|
* Merge pull request #2464 from libgit2/cmn/host-cert-infoVicent Marti2014-09-1717-91/+422
|\ | | | | 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.
| * winhttp: get rid of the cert ignore flagCarlos Martín Nieto2014-09-161-7/+0
| | | | | | | | This brings us back in line with the other transports.
| * ssh: expose both hashesCarlos Martín Nieto2014-09-163-22/+38
| | | | | | | | | | 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-163-11/+21
| | | | | | | | | | 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.
| * script: use a parallel build on TravisCarlos Martín Nieto2014-09-161-1/+1
| |
| * net: use only structs to pass information about certCarlos Martín Nieto2014-09-166-19/+56
| | | | | | | | | | | | 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-1639-159/+796
| |\
| * | ssh: add test for host keyCarlos Martín Nieto2014-09-162-1/+36
| | | | | | | | | | | | | | | Test that the certificate check callback gets the right fingerprint from the host we're connecting to.
| * | net: remove support for outright ignoring certificatesCarlos Martín Nieto2014-09-167-41/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This option make it easy to ignore anything about the server we're connecting to, which is bad security practice. This was necessary as we didn't use to expose detailed information about the certificate, but now that we do, we should get rid of this. If the user wants to ignore everything, they can still provide a callback which ignores all the information passed.
| * | transport: move the cert type enum to types.hCarlos Martín Nieto2014-09-162-17/+16
| | | | | | | | | | | | This should make the mingw compiler happy.
| * | winhttp: set ignore security flags on user commandCarlos Martín Nieto2014-09-161-6/+42
| | | | | | | | | | | | If the user returns 0 from the certificate check and we had certificate issues, set the options to ignore certificate errors and resend the request.
| * | winhttp: bring together request sendingCarlos Martín Nieto2014-09-161-32/+44
| | | | | | | | | | | | We need to call WinHttpSendRequest() in three different places. Unify all in a single function to have a single place for the certificate check.
| * | winhttp: only do certificate check for SSLCarlos Martín Nieto2014-09-161-1/+1
| | | | | | | | | | | | If we're not using SSL, don't call the user's certificate check callback.
| * | winhttp: credential check on successful connectCarlos Martín Nieto2014-09-162-2/+45
| | | | | | | | | | | | 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-163-22/+19
| | | | | | | | | | | | | | | 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-162-47/+47
| | | | | | | | | | | | | | | 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-164-16/+22
| | | | | | | | | | | | | | | | | | | | | 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
| | |
| * | http: send the DER-encoded cert to the callbackCarlos Martín Nieto2014-09-164-26/+52
| | | | | | | | | | | | | | | | | | Instead of the parsed data, we can ask OpenSSL to give us the DER-encoded version of the certificate, which the user can then parse and validate.
| * | Provide a callback for certificate validationCarlos Martín Nieto2014-09-1612-8/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-174-1/+7
| | |
* | | Merge pull request #2569 from libgit2/cmn/valgrind-onceVicent Marti2014-09-161-3/+10
|\ \ \ | | | | | | | | travis: run valgrind only once
| * | | travis: run valgrind only oncecmn/valgrind-onceCarlos Martín Nieto2014-09-161-3/+10
|/ / / | | | | | | | | | | | | | | | | | | Instead of running valgrind on each job, half of which are in release mode and don't have much usable information for valgrind, perform an debug build as part of allowed_failures and run valgrind on that one, which should speed up the feedback we get from the builds.
* | | Merge pull request #2565 from linquize/typoVicent Marti2014-09-162-2/+2
|\ \ \ | | | | | | | | Fix typo
| * | | Fix typoLinquize2014-09-162-2/+2
| | |/ | |/|
* | | Merge pull request #2561 from jacquesg/merge-skipVicent Marti2014-09-162-3/+52
|\ \ \ | | | | | | | | No files merged may result in bogus merge conflict error
| * | | Remove local unused index_repo variableJacques Germishuys2014-09-121-3/+1
| | | |
| * | | Only check for workdir conflicts if the index has merged filesJacques Germishuys2014-09-121-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | Passing 0 as the length of the paths to check to git_diff_index_to_workdir results in all files being treated as conflicting, that is, all untracked or modified files in the worktree is reported as conflicting
| * | | 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.
* | | | attr: Cleanup the containing dir logicThe rugged tests are fragile2014-09-161-5/+5
| | | |
* | | | Merge pull request #2566 from libgit2/rb/attr-with-bareVicent Marti2014-09-164-0/+77
|\ \ \ \ | |_|/ / |/| | | Fix attribute lookup in index for bare repos
| * | | Fix attribute lookup in index for bare reposrb/attr-with-bareRussell Belfer2014-09-154-0/+77
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 #2563 from alexcrichton/rust-bindingsVicent Marti2014-09-151-0/+2
|\ \ \ | | | | | | | | Add Rust to the language bindings list
| * | | Add Rust to the language bindings listAlex Crichton2014-09-151-0/+2
|/ / /
* | | Merge pull request #2554 from linquize/fetch-head-tagVicent Marti2014-09-153-2/+33
|\ \ \ | |/ / |/| | 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-063-2/+33
| |/
* | Merge pull request #2558 from libgit2/cmn/signature-empty-emailVicent Marti2014-09-102-4/+4
|\ \ | | | | | | signature: don't allow empty emails
| * | signature: don't allow empty emailscmn/signature-empty-emailCarlos Martín Nieto2014-09-102-4/+4
|/ / | | | | | | | | | | 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-095-27/+138
|\ \ | | | | | | Restrict which refs can be the default branch
| * | clone: handle overly restrictive refspecscmn/remote-default-restrictCarlos Martín Nieto2014-09-022-35/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-022-19/+17
| | | | | | | | | | | | | | | 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.
| * | clone: support remotes with references but no branchesCarlos Martín Nieto2014-08-291-2/+19
| | | | | | | | | | | | | | | | | | | | | A repository can have any number of references which we're not interested in such as notes or tags. For the default branch calculation we only care about branches. Make the decision about the number of branches rather than the number of refs in general.