summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | | | winhttp: credential check on successful connectCarlos Martín Nieto2014-09-161-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-162-20/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-47/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-162-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | | | | | http: send the DER-encoded cert to the callbackCarlos Martín Nieto2014-09-162-22/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-166-7/+68
| | |_|_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-171-1/+3
| | | | | | | | | |
* | | | | | | | | | Merge pull request #2561 from jacquesg/merge-skipVicent Marti2014-09-161-3/+11
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | | | | attr: Cleanup the containing dir logicThe rugged tests are fragile2014-09-161-5/+5
| | | | | | | | | |
* | | | | | | | | | Fix attribute lookup in index for bare reposrb/attr-with-bareRussell Belfer2014-09-152-0/+28
| |_|/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-151-2/+6
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | 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-061-2/+6
| |/ / / / / / /
* | | | | | | | 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-25/+30
|\ \ \ \ \ \ \ | |_|_|_|/ / / |/| | | | | | Restrict which refs can be the default branch
| * | | | | | clone: handle overly restrictive refspecscmn/remote-default-restrictCarlos Martín Nieto2014-09-021-23/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-19/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | 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.
| * | | | | | remote: short-circuit the default branch check if there is noneCarlos Martín Nieto2014-08-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we do not have a HEAD ref in the heads, we already know there is no default branch. Return immedately.
| * | | | | | remote: restrict default branch to branches namespaceCarlos Martín Nieto2014-08-291-0/+3
| |/ / / / /
* | | | | | reflog: Error handling on empty reflogVicent Marti2014-09-051-18/+15
| | | | | |
* | | | | | ssh: store error message immediately after a failed agent callcmn/ssh-errorsCarlos Martín Nieto2014-09-041-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the call to the agent fails, we must retrieve the error message just after the function call, as other calls may overwrite it. As the agent authentication is the only one which has a teardown and there does not seem to be a way to get the error message from a stored error number, this tries to introduce some small changes to store the error from the agent. Clearing the error at the beginning of the loop lets us know whether the agent has already set the libgit2 error message and we should skip it, or if we should set it.
* | | | | | Merge pull request #2543 from libgit2/cmn/known-transportsVicent Marti2014-09-031-32/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | Clean up transport lookup
| * | | | | | remote: get rid of git_remote_valid_url()Carlos Martín Nieto2014-08-311-13/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | transport: return ENOTFOUND for HTTPS and SSH when they're not supportedCarlos Martín Nieto2014-08-311-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous commit makes it harder to figure out if the library was built with support for a particular transport. Roll back some of the changes and remove ssh:// and https:// from the list if we're being built without support for them.
| * | | | | | transport: distinguish between unknown and unsupported transportsCarlos Martín Nieto2014-08-311-24/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even when built without a SSH support, we know about this transport. It is implemented, but the current code makes us return an error message saying it's not. This is a leftover from the initial implementation of the transports when there were in fact transports we knew about but were not implemented. Instead, let the SSH transport itself say it cannot run, the same as we do for HTTPS.
* | | | | | | Merge pull request #2530 from libgit2/jamill/relative_gitlinkVicent Marti2014-09-034-41/+163
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Teach repository to use relative paths for git symbolic links
| * | | | | | | Introduce option to use relative paths for repository work directoryjamill/relative_gitlinkJameson Miller2014-09-022-41/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-022-0/+66
| |/ / / / / /
* | | | | | | Several CppCat warnings fixedArkady Shapkin2014-09-034-6/+3
|/ / / / / /
* | | | | | Merge pull request #2481 from libgit2/cmn/oidarrayVicent Marti2014-08-293-1/+92
|\ \ \ \ \ \ | |/ / / / / |/| | | | | merge: expose multiple merge bases
| * | | | | merge: expose multiple merge basescmn/oidarrayCarlos Martín Nieto2014-07-273-1/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We always calculate multiple merge bases, but up to now we had only exposed the "best" merge base. Introduce git_oidarray which analogously to git_strarray lets us return multiple ids.
* | | | | | Merge pull request #2539 from libgit2/cmn/ahead-behind-orderVicent Marti2014-08-281-2/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix ahead-behind results
| * | | | | | graph: fix ahead-behind logiccmn/ahead-behind-orderCarlos Martín Nieto2014-08-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we see PARENT1, it means there is a local commit and thus we are ahead. Likewise, seeing PARENT2 means that the upstream branch has a commit and we are one more behind. The logic is currently reversed. Correct it. This fixes #2501.
* | | | | | | Merge pull request #2538 from libgit2/ntk/propagate_url_parsing_errorVicent Marti2014-08-271-3/+3
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | winhttp: Prevent swallowing of url parsing error
| * | | | | | | winhttp: Prevent swallowing of url parsing errornulltoken2014-08-271-3/+3
| | | | | | | |
* | | | | | | | Merge pull request #2502 from rnowosielski/remote_set_timeoutVicent Marti2014-08-271-1/+17
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Set timeout on remote (Add timeout for WinHttpReceiveResponse #2147)
| * | | | | | | | Set timeout on remote (WinHTTP) should return error in case of failure. ↵Rafal Nowosielski2014-08-271-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Connection timeout set to 1 minute. Read/Write timeout remains set to infinite #2147
| * | | | | | | | Set timeout on remote (WinHTTP) to infinite #2147Rafal Nowosielski2014-08-231-0/+8
| | | | | | | | |
* | | | | | | | | Merge pull request #2490 from csware/ssh-wintunnelVicent Marti2014-08-271-20/+26
|\ \ \ \ \ \ \ \ \ | |_|/ / / / / / / |/| | | | | | | | Allow to override default ssh transport_cb - in order to allow third party ssh transports
| * | | | | | | | Allow to override default ssh transport_cbSven Strickroth2014-08-261-20/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | W/o this patch it is not possible to have a third party ssh transport_cb if GIT_SSH is disabled or a third party transport_cb which has a higher priority than the default one. Signed-off-by: Sven Strickroth <email@cs-ware.de>
* | | | | | | | | Merge remote-tracking branch 'upstream/master' into cmn/ssh-retryCarlos Martín Nieto2014-08-2770-756/+1895
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | Refactor git_cache to use an rwlockJustin Spahr-Summers2014-08-262-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This significantly reduces contention when many threads are trying to read from the cache simultaneously.
| * | | | | | | | | Merge pull request #2508 from libgit2/rb/fix-ignore-slash-starVicent Marti2014-08-262-1/+22
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Fix bugs with negative ignores inside an ignored parent directory
| | * | | | | | | | | For negative matches, always use leading dir matchRussell Belfer2014-08-081-1/+2
| | | | | | | | | | |
| | * | | | | | | | | Fix rejection of parent dir of negated ignoresRussell Belfer2014-08-082-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While scanning through a directory hierarchy, this prevents a positive ignore match on a parent directory from blocking the scan of a directory when a negative match rule exists for files inside the directory.
| * | | | | | | | | | pack: return the correct final offsetcmn/unpack-offsetCarlos Martín Nieto2014-08-261-1/+1
| | |_|_|/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The callers of git_packfile_unpack() expect the obj_offset argument to be set to the beginning of the next object. We were mistakenly returning the the offset of the object's data, which causes the CRC function to try to use the wrong offset. Set obj_offset to curpos instead of elem->offset to point to the next element and bring back expected behaviour.
| * | | | | | | | | Merge pull request #2532 from arthurschreiber/arthur/fix-merge-base-commit-checkVicent Marti2014-08-251-1/+4
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | merge base: Correctly raise an error if a non-commit object is passed.
| | * | | | | | | | | merge base: Correctly raise an error if a non-commit object is passed.Arthur Schreiber2014-08-251-1/+4
| | | |_|/ / / / / / | | |/| | | | | | |