summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | refdb_fs: fail if refcache returns NULL pointerPatrick Steinhardt2016-03-111-0/+1
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We usually check entries returned by `git_sortedcache_entry` for NULL pointers. As we have a write lock in `packed_write`, though, it really should not happen that the function returns NULL. Assert that ref is not NULL to silence a Coverity warning.
* | | | | Merge pull request #3647 from pks-t/pks/coverity-fixes-round6Carlos Martín Nieto2016-03-148-17/+45
|\ \ \ \ \ | | | | | | | | | | | | Coverity fixes round 6
| * | | | | coverity: report errors when uploading tarballPatrick Steinhardt2016-03-111-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Curl by default does not report errors by setting the error code. As the upload can fail through several conditions (e.g. the rate limit, leading to unauthorized access) we should indicate this information in Travis CI. To improve upon the behavior, use `--write-out=%{http_code}` to write out the HTTP code in addition to the received body and return an error if the code does not equal 201.
| * | | | | diff_tform: fix potential NULL pointer accessPatrick Steinhardt2016-03-111-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the user passes in a diff which has no repository associated we may call `git_config__get_int_force` with a NULL-pointer configuration. Even though `git_config__get_int_force` is designed to swallow errors, it is not intended to be called with a NULL pointer configuration. Fix the issue by only calling `git_config__get_int_force` only when configuration could be retrieved from the repository.
| * | | | | submodule: avoid passing NULL pointers to strncmpPatrick Steinhardt2016-03-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In C89 it is undefined behavior to pass `NULL` pointers to `strncmp` and later on in C99 it has been explicitly stated that functions with an argument declared as `size_t nmemb` specifying the array length shall always have valid parameters, no matter if `nmemb` is 0 or not (see ISO 9899 §7.21.1.2). The function `str_equal_no_trailing_slash` always passes its parameters to `strncmp` if their lengths match. This means if one parameter is `NULL` and the other one either `NULL` or a string with length 0 we will pass the pointers to `strncmp` and cause undefined behavior. Fix this by explicitly handling the case when both lengths are 0.
| * | | | | pack-objects: fix memory leak on overflowPatrick Steinhardt2016-03-111-1/+3
| | | | | |
| * | | | | index: assert required OID are non-NULLPatrick Steinhardt2016-03-111-3/+9
| | | | | |
| * | | | | object: avoid call of memset with ouf of bounds pointerPatrick Steinhardt2016-03-111-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When computing a short OID we do this by first copying the leading parts into the new OID structure and then setting the trailing part to zero. In the case of the desired length being `GIT_OID_HEXSZ - 1` we will call `memset` with an out of bounds pointer and a length of 0. While this seems to cause no problems for common platforms the C89 standard does not explicitly state that calling `memset` with an out of bounds pointer and length of 0 is valid. Fix the potential issue by using the newly introduced `git_oid__cpy_prefix` function.
| * | | | | config_file: handle missing quotation marks in section headerPatrick Steinhardt2016-03-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When parsing a section header we expect something along the format of '[section "subsection"]'. When a section is mal-formated and is entirely missing its quotation marks we catch this case by observing that `strchr(line, '"') - strrchr(line, '"') = NULL - NULL = 0` and error out. Unfortunately, the error message is misleading though, as we state that we are missing the closing quotation mark while we in fact miss both quotation marks. Improve the error message by explicitly checking if the first quotation mark could be found and, if not, stating that quotation marks are completely missing.
| * | | | | describe: handle error code returned by git_pqueue_insertPatrick Steinhardt2016-03-101-1/+2
| |/ / / /
* | | | | Merge pull request #3671 from libgit2/cmn/remove-mingw32Edward Thomson2016-03-144-25/+1
|\ \ \ \ \ | | | | | | | | | | | | Remove CI support for mingw32
| * | | | | Remove CI support for mingw32cmn/remove-mingw32Carlos Martín Nieto2016-03-144-25/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests have never run successfully and we do have successful builds of mingw-w64, so remove these CI builds which do not add value.
* | | | | | Merge pull request #3683 from dbussink/dbussink/better-openssl-ciphersCarlos Martín Nieto2016-03-146-1/+53
|\ \ \ \ \ \ | | | | | | | | | | | | | | Setup better defaults for OpenSSL ciphers
| * | | | | | Use general cl_git_fail because the error is genericDirkjan Bussink2016-03-141-2/+1
| | | | | | |
| * | | | | | Start error string with lower case characterDirkjan Bussink2016-03-141-2/+2
| | | | | | |
| * | | | | | Setup better defaults for OpenSSL ciphersDirkjan Bussink2016-03-146-0/+53
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures that when using OpenSSL a safe default set of ciphers is selected. This is done so that the client communicates securely and we don't accidentally enable unsafe ciphers like RC4, or even worse some old export ciphers. Implements the first part of https://github.com/libgit2/libgit2/issues/3682
* | | | | | Merge pull request #3636 from nerdishbynature/fix-non-modular-header-in-moduleCarlos Martín Nieto2016-03-111-1/+2
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | Don't include inttypes if compiling for Mac/iOS
| * | | | | Check for __CLANG_INTTYPES_HPiet Brauer2016-03-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes an issue in Xcode 7.3 in objective-git where we get the error "Include of non-modular header file in module". Not importing this header again fixes the issue.
* | | | | | Merge pull request #3623 from ethomson/rebase_with_commitCarlos Martín Nieto2016-03-093-5/+288
|\ \ \ \ \ \ | | | | | | | | | | | | | | rebase: additional setup tests of exotic behavior
| * | | | | | rebase: additional tests for completing a rebaseEdward Thomson2016-02-282-5/+83
| | | | | | |
| * | | | | | rebase: additional setup tests of exotic behaviorEdward Thomson2016-02-171-0/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test some additional exotic rebase setup behavior: that we are able to set up properly when already in a detached HEAD state, that the caller specifies all of branch, upstream and onto, and that the caller specifies branch, upstream and onto by ID.
* | | | | | | Merge pull request #3672 from libgit2/cmn/do-fail-appveyorCarlos Martín Nieto2016-03-091-0/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | appveyor: stop if the first test fails
| * | | | | | | appveyor: stop if the first test failsCarlos Martín Nieto2016-03-091-0/+1
| | |_|/ / / / | |/| | | | |
* | | | | | | Merge pull request #3670 from libgit2/vmg/expand-fixesEdward Thomson2016-03-092-70/+163
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | Fixes for `gid_odb_expand_ids`
| * | | | | | odb: Try to lookup headers in all backends before passthroughvmg/expand-fixesVicent Marti2016-03-091-5/+20
| | | | | | |
| * | | | | | odb: Refactor `git_odb_expand_ids`Vicent Marti2016-03-091-21/+26
| | | | | | |
| * | | | | | odb: Implement new helper to read types without refreshingVicent Marti2016-03-091-45/+104
| | | | | | |
| * | | | | | odb: Handle corner cases in `git_odb_expand_ids`Vicent Marti2016-03-092-22/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old implementation had two issues: 1. OIDs that were too short as to be ambiguous were not being handled properly. 2. If the last OID to expand in the array was missing from the ODB, we would leak a `GIT_ENOTFOUND` error code from the function.
* | | | | | | Merge pull request #3668 from libgit2/cmn/mwindow-try-harderEdward Thomson2016-03-091-2/+12
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | mwindow: free unused windows if we fail to mmap
| * | | | | | mwindow: free unused windows if we fail to mmapcmn/mwindow-try-harderCarlos Martín Nieto2016-03-091-2/+12
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first time may be due to memory fragmentation or just bad luck on a 32-bit system. When we hit the mmap error for the first time, free up the unused windows and try again.
* | | | | | Merge pull request #3656 from ethomson/exists_prefixesVicent Marti2016-03-088-37/+297
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | Introduce `git_odb_expand_ids`
| * | | | | git_odb_expand_ids: accept git_odb_expand_id arrayEdward Thomson2016-03-083-92/+89
| | | | | | | | | | | | | | | | | | | | | | | | Take (and write to) an array of a struct, `git_odb_expand_id`.
| * | | | | git_odb_expand_ids: rename func, return the typeEdward Thomson2016-03-083-32/+49
| | | | | |
| * | | | | git_odb_exists_many_prefixes: query odb for multiple short idsEdward Thomson2016-03-074-13/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Query the object database for multiple objects at a time, given their object ID (which may be abbreviated) and optional type.
| * | | | | odb: improved not found error messagesEdward Thomson2016-03-075-24/+34
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | When looking up an abbreviated oid, show the actual (abbreviated) oid the caller passed instead of a full (but ambiguously truncated) oid.
* | | | | Merge pull request #3555 from cbargren/ssh-git-protocolsEdward Thomson2016-03-084-19/+49
|\ \ \ \ \ | | | | | | | | | | | | Support for ssh+git and git+ssh protocols
| * | | | | TabsChris Bargren2015-12-281-2/+2
| | | | | |
| * | | | | Adding test cases that actually test the functionality of the new transportChris Bargren2015-12-281-0/+6
| | | | | | | | | | | | | | | | | | ssh, ssh+git and git+ssh should all successfully build an SSH transport
| * | | | | Removing #define for SSH_PREFIX_COUNT and using ARRAY_SIZE insteadChris Bargren2015-12-281-6/+5
| | | | | | | | | | | | | | | | | | Also moving var declarations to top of blocks to support bad old compilers
| * | | | | Updating change to http_parser to reflect PR for nodejs/http-parserChris Bargren2015-12-281-2/+5
| | | | | | | | | | | | | | | | | | The parser now also supports digits, '-' and '.'. https://github.com/nodejs/http-parser/pull/276
| * | | | | Adding spec coverage for ssh+git and git+ssh protocolsChris Bargren2015-12-221-0/+4
| | | | | |
| * | | | | Handle git+ssh:// and ssh+git:// protocols supportChris Bargren2015-12-222-17/+35
| | | | | |
| * | | | | Updating http parser to accept a `+` in the schemaChris Bargren2015-12-221-1/+1
| | | | | |
* | | | | | Merge pull request #3652 from libgit2/cmn/commit-to-memoryEdward Thomson2016-03-084-47/+216
|\ \ \ \ \ \ | | | | | | | | | | | | | | commit: split creating the commit and writing it out
| * | | | | | commit: split creating the commit and writing it outcmn/commit-to-memoryCarlos Martín Nieto2016-03-084-47/+216
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes you want to create a commit but not write it out to the objectdb immediately. For these cases, provide a new function to retrieve the buffer instead of having to go through the db.
* | | | | | Merge pull request #3655 from ethomson/nanosecond_defaultsCarlos Martín Nieto2016-03-084-31/+66
|\ \ \ \ \ \ | | | | | | | | | | | | | | Enable nanosecond resolution by default
| * | | | | | index::racy: force racy entryEdward Thomson2016-03-081-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of hoping that we can get a racy entry by going real fast and praying real hard, just create a racy entry.
| * | | | | | index::nsec: don't expect shit filesystems to not suckEdward Thomson2016-03-071-9/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the underlying filesystem doesn't support better than one second resolution, then don't expect that turning on `GIT_USE_NSEC` does anything magical to change that.
| * | | | | | merge::workdir::dirty: update to use `st_ctime_nsec`Edward Thomson2016-03-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update unit test to use newfangled `st_ctime_nsec`, which provides indirection to the platform-correct name.
| * | | | | | Enable nanosecond resolution by defaultEdward Thomson2016-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nanosecond resolution is now the default in git itself. Enable this as our default as well.