summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | | map: use `giterr_set` internallyEdward Thomson2016-02-231-1/+1
|/ / | | | | | | | | | | Use the `giterr_set` function, which actually supports `GITERR_OS`. The `giterr_set_str` function is exposed for external users and will not append the operating system's error message.
* | git_libgit2_opts: validate keyEdward Thomson2016-02-221-0/+3
| |
* | openssl: re-export the last-resort locking functionv0.24.0-rc1cmn/init-sshCarlos Martín Nieto2016-02-191-0/+1
| | | | | | | | | | We need to include the header where we define the function. Otherwise it won't be available on the DLL.
* | openssl: free the context even if we don't connectCarlos Martín Nieto2016-02-191-1/+1
| |
* | global: remove an unused variableCarlos Martín Nieto2016-02-191-8/+0
| |
* | Merge pull request #3597 from ethomson/filter_registrationCarlos Martín Nieto2016-02-196-279/+336
|\ \ | | | | | | Filter registration
| * | filter: avoid races during filter registrationEdward Thomson2016-02-082-124/+157
| | | | | | | | | | | | | | | | | | | | | Previously we would set the global filter registry structure before adding filters to the structure, without a lock, which is quite racy. Now, register default filters during global registration and use an rwlock to read and write the filter registry (as appopriate).
| * | mingw: use gcc-like memory barrierEdward Thomson2016-02-081-1/+1
| | | | | | | | | | | | Use the gcc-like memory barrier (__sync_synchronize) on mingw.
| * | global: make openssl registration like the restEdward Thomson2016-02-083-115/+128
| | |
| * | global: refactor setup and cleanupEdward Thomson2016-02-081-59/+70
| | | | | | | | | | | | | | | Move the common initialization and cleanup methods to reduce unnecessary duplication.
* | | netops: fix memory leak when an error occursPatrick Steinhardt2016-02-181-0/+4
| | |
* | | transports: smart_pkt: fix memory leaksPatrick Steinhardt2016-02-181-0/+3
| | |
* | | transports: smart: fix memory leak on OOM pathPatrick Steinhardt2016-02-181-0/+2
| | |
* | | signature: use GITERR_CHECK_ALLOC to check for OOM situationPatrick Steinhardt2016-02-181-3/+2
| | | | | | | | | | | | | | | | | | | | | When checking for out of memory situations we usually use the GITERR_CHECK_ALLOC macro. Besides conforming to our current code base it adds the benefit of silencing errors in Coverity due to Coverity handling the macro's error path as abort.
* | | Merge pull request #3604 from ethomson/nsec_xplatCarlos Martín Nieto2016-02-183-7/+7
|\ \ \ | | | | | | | | Handle `USE_NSECS`
| * | | xplat: use st_mtimespec everywhere on macEdward Thomson2016-02-092-6/+6
| | | |
| * | | Fix the build when defining USE_NSECMarius Ungureanu2016-01-251-1/+1
| | | |
* | | | Merge pull request #3606 from ethomson/drop_xpCarlos Martín Nieto2016-02-181-18/+3
|\ \ \ \ | | | | | | | | | | win32: drop xp support in WideCharToMultiByte
| * | | | win32: drop xp support in WideCharToMultiByteEdward Thomson2016-02-091-18/+3
| | | | |
* | | | | Merge pull request #3613 from ethomson/fixupsCarlos Martín Nieto2016-02-189-37/+103
|\ \ \ \ \ | | | | | | | | | | | | Remove most of the silly warnings
| * | | | | winhttp: use an unsigned iteratorEdward Thomson2016-02-161-1/+1
| | | | | |
| * | | | | submodule: explicitly cast to the teensy time valueEdward Thomson2016-02-161-2/+2
| | | | | |
| * | | | | index: explicitly cast the teeny index entry membersEdward Thomson2016-02-161-3/+3
| | | | | |
| * | | | | index: don't use `seek` return as an error codeEdward Thomson2016-02-161-2/+2
| | | | | |
| * | | | | index: explicitly cast new hash size to an intEdward Thomson2016-02-161-1/+1
| | | | | |
| * | | | | fstat: use our custom `stat`Edward Thomson2016-02-163-12/+62
| | | | | |
| * | | | | tree: zap warnings around `size_t` vs `uint16_t`Edward Thomson2016-02-161-10/+16
| | | | | |
| * | | | | win32: introduce p_timeval that isn't stupidEdward Thomson2016-02-125-6/+16
| |/ / / / | | | | | | | | | | | | | | | | | | | | Windows defines `timeval` with `long`, which we cannot sanely cope with. Instead, use a custom timeval struct.
* | | | | Merge pull request #3619 from ethomson/win32_forbiddenCarlos Martín Nieto2016-02-186-20/+55
|\ \ \ \ \ | | | | | | | | | | | | win32: allow us to read indexes with forbidden paths on win32
| * | | | | index: allow read of index w/ illegal entriesEdward Thomson2016-02-175-17/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow `git_index_read` to handle reading existing indexes with illegal entries. Allow the low-level `git_index_add` to add properly formed `git_index_entry`s even if they contain paths that would be illegal for the current filesystem (eg, `AUX`). Continue to disallow `git_index_add_bypath` from adding entries that are illegal universally illegal (eg, `.git`, `foo/../bar`).
| * | | | | iterator: assert tree_iterator has a frameEdward Thomson2016-02-171-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although a `tree_iterator` that failed to be properly created does not have a frame, all other `tree_iterator`s should. Do not call `pop` in the failure case, but assert that in all other cases there is a frame.
| * | | | | Validate pointer before access the member.Colin Xu2016-02-171-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Git repository at network locations, sometimes git_iterator_for_tree fails at iterator__update_ignore_case so it goes to git_iterator_free. Null pointer will crash the process if not check. Signed-off-by: Colin Xu <colin.xu@gmail.com>
* | | | | | commit: expose the different kinds of errorsCarlos Martín Nieto2016-02-161-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should be checking whether the object we're looking up is a commit, and we should let the caller know whether the not-found return code comes from a bad object type or just a missing signature.
* | | | | | rebase: persist a single in-memory indexEdward Thomson2016-02-151-12/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When performing an in-memory rebase, keep a single index for the duration, so that callers have the expected index lifecycle and do not hold on to an index that is free'd out from under them.
* | | | | | Merge pull request #3610 from ethomson/rebase_bareCarlos Martín Nieto2016-02-121-118/+251
|\ \ \ \ \ \ | | | | | | | | | | | | | | rebase: introduce bare rebasing
| * | | | | | rebase: allow custom merge_optionsEdward Thomson2016-02-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow callers of rebase to specify custom merge options. This may allow custom conflict resolution, or failing fast when conflicts are detected.
| * | | | | | rebase: introduce inmemory rebasingEdward Thomson2016-02-111-117/+250
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce the ability to rebase in-memory or in a bare repository. When `rebase_options.inmemory` is specified, the resultant `git_rebase` session will not be persisted to disk. Callers may still analyze the rebase operations, resolve any conflicts against the in-memory index and create the commits. Neither `HEAD` nor the working directory will be updated during this process.
* | | | | | Horrible fix for #3173.Arthur Schreiber2016-02-119-26/+28
| | | | | |
* | | | | | commit: don't forget the last header fieldCarlos Martín Nieto2016-02-111-1/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we moved the logic to handle the first one, wrong loop logic was kept in place which meant we still finished early. But we now notice it because we're not reading past the last LF we find. This was not noticed before as the last field in the tested commit was multi-line which does not trigger the early break.
* | | | | Merge pull request #3599 from libgit2/gpgsignVicent Marti2016-02-091-0/+86
|\ \ \ \ \ | | | | | | | | | | | | Introduce git_commit_extract_signature
| * | | | | Introduce git_commit_extract_signaturegpgsignCarlos Martín Nieto2016-02-091-0/+86
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | This returns the GPG signature for a commit and its contents without the signature block, allowing for the verification of the commit's signature.
* | | | | Merge pull request #3603 from pks-t/pks/coverity-fixesCarlos Martín Nieto2016-02-094-8/+14
|\ \ \ \ \ | | | | | | | | | | | | Coverity fixes
| * | | | | attr_file: fix resource leakPatrick Steinhardt2016-02-091-2/+3
| | | | | |
| * | | | | checkout: fix resource leakPatrick Steinhardt2016-02-091-1/+3
| | | | | |
| * | | | | pack-objects: fix memory leak in packbuilder_configPatrick Steinhardt2016-02-091-4/+7
| | | | | |
| * | | | | pack-objects: fix memory leak in compute_write_orderPatrick Steinhardt2016-02-091-0/+1
| | | | | |
| * | | | | pack: do not free passed in poiter on errorPatrick Steinhardt2016-02-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function `git_packfile_stream_open` tries to free the passed in stream when an error occurs. The only call site is `git_indexer_append`, though, which passes in the address of a stream struct which has not been allocated on the heap. Fix the issue by simply removing the call to free. In case of an error we did not allocate any memory yet and otherwise it should be the caller's responsibility to manage it's object's lifetime.
* | | | | | Merge pull request #3602 from libgit2/cmn/header-field-2Carlos Martín Nieto2016-02-091-17/+22
|\ \ \ \ \ \ | |/ / / / / |/| | | | | commit: also match the first header field when searching
| * | | | | commit: also match the first header field when searchingcmn/header-field-2Carlos Martín Nieto2016-02-091-17/+22
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were searching only past the first header field, which meant we were unable to find e.g. `tree` which is the first field. While here, make sure to set an error message in case we cannot find the field.
* | | | | curl_stream: fix unused cert infosPatrick Steinhardt2016-02-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | When copying contents of the cURL certiinfo we duplicate the data but forget to actually put it into the vector.