summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | | | | remote: store passive refspecsCarlos Martín Nieto2014-09-302-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The configured/base fetch refspecs need to be taken into account in order to implement opportunistic remote-tracking branch updates. DWIM them and store them in the struct, but don't do anything with them yet.
| * | | | | | | | | | | remote: don't DWIM refspecs unnecessarilyCarlos Martín Nieto2014-09-301-19/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can only DWIM when we've connected to the remote and have the list of the remote's references. Adding or setting the refspecs should not trigger an attempt to DWIM the refspecs as we typically cannot do it, and even if we did, we would not use them for the current fetch.
| * | | | | | | | | | | remote: allow overriding the refspecs for download and fetchCarlos Martín Nieto2014-09-302-8/+37
| |/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With opportunistic ref updates, git has introduced the concept of having base refspecs *and* refspecs that are active for a particular fetch. Let's start by letting the user override the refspecs for download.
* | | | | | | | | | | Extract shared functionality.Arthur Schreiber2014-10-091-55/+41
| | | | | | | | | | |
* | | | | | | | | | | Add git_merge_bases_many.Arthur Schreiber2014-10-091-0/+67
| |/ / / / / / / / / |/| | | | | | | | |
* | | | | | | | | | hashsig: Export as a `sys` headervmg/hashsigVicent Marti2014-10-014-75/+3
| | | | | | | | | |
* | | | | | | | | | path: fix invalid accessErdur2014-09-301-1/+4
|/ / / / / / / / /
* | | | | | | | | Merge pull request #2581 from jacquesg/stash-ignored-directoriesEdward Thomson2014-09-291-3/+5
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Stash ignored directories
| * | | | | | | | | Recurse ignored directories when stashingJacques Germishuys2014-09-261-3/+5
| | |/ / / / / / / | |/| | | | | | |
* | | | | | | | | Merge pull request #2584 from jacquesg/pool-alignmentEdward Thomson2014-09-295-26/+40
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Pool/Index data is not aligned
| * | | | | | | | | Ensure patch is initialized to zero, otherwise, the allocated flag may be setJacques Germishuys2014-09-261-0/+1
| | | | | | | | | |
| * | | | | | | | | Silence uninitialized warningJacques Germishuys2014-09-261-1/+1
| | | | | | | | | |
| * | | | | | | | | The raw index buffer content is not guaranteed to be alignedJacques Germishuys2014-09-261-24/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Ensure alignment by copying the content into a structure on the stack
| * | | | | | | | | Ensure pool data is aligned on an 8 byte boundaryJacques Germishuys2014-09-251-1/+1
| | | | | | | | | |
| * | | | | | | | | Introduce GIT_ALIGNJacques Germishuys2014-09-251-0/+8
| |/ / / / / / / /
* | | | | | | | | Merge pull request #2582 from swansontec/masterEdward Thomson2014-09-291-1/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Correctly handle getaddrinfo return result
| * | | | | | | | | Correctly handle getaddrinfo return resultWilliam Swanson2014-09-241-1/+1
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The getaddrinfo function indicates failure with a non-zero return code, but this code is not necessarily negative. On platforms like Android where the code is positive, a failed call causes libgit2 to segfault.
* | | | | | | | | Merge pull request #2559 from libgit2/cmn/free-tls-errorEdward Thomson2014-09-291-0/+3
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | 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/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-173-5/+6
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Factor 40 and 41 constants from source.
| * | | | | | | | | Factor 40 and 41 constants from source.Ciro Santilli2014-09-163-5/+6
| | |_|_|_|_|_|/ / | |/| | | | | | |
* | | | | | | | | Merge pull request #2571 from libgit2/vmg/walk-up-pathVicent Marti2014-09-176-24/+41
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Fix `git_path_walk_up` to work with non-rooted paths
| * | | | | | | | | 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
| | | | | | | | | |
| * | | | | | | | | path: Fix `git_path_walk_up` to work with non-rooted pathsThe rugged tests are fragile2014-09-175-11/+26
| | | | | | | | | |
* | | | | | | | | | 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-179-77/+225
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Provide a callback for certificate validation
| * | | | | | | | | 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-161-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-163-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1617-128/+322
| |\ \ \ \ \ \ \ \ \
| * | | | | | | | | | net: remove support for outright ignoring certificatesCarlos Martín Nieto2014-09-165-30/+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.
| * | | | | | | | | | 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-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 `""`.