summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* CMake: fall back to OpenSSL on older OS Xcmn/old-securityCarlos Martín Nieto2015-08-191-2/+12
| | | | | | | | | | Starting at OS X 10.8, the Security framework offers some functions which are unified across OS X and iOS. These are the functions that we use. Older versions of OS X do not have these functions and we fail to compile. In these situations, fall back to using OpenSSL for our TLS stream instead.
* Merge pull request #3387 from leoyanggit/build_warningCarlos Martín Nieto2015-08-181-0/+1
|\ | | | | Fix build warning: implicit declaration of function ‘git_transaction_config_new’
| * Fix build warning: implicit declaration of function ↵Leo Yang2015-08-171-0/+1
|/ | | | ‘git_transaction_config_new’
* Merge pull request #3377 from dleehr/fix-push-cbEdward Thomson2015-08-151-1/+1
|\ | | | | Fix bug in git_smart__push: push_transfer_progress cb is only called at end
| * Fix bug in git_smart__push: push_transfer_progress cb is never calledDan Leehr2015-08-131-1/+1
| | | | | | | | The conditional checked cbs->transfer_progress then used the value in cbs->push_transfer_progress. In both cases it should be push_transfer_progress
* | Merge pull request #3384 from libgit2/cmn/regex-nofailEdward Thomson2015-08-152-7/+32
|\ \ | | | | | | diff: don't error out on an invalid regex
| * | diff: don't error out on an invalid regexcmn/regex-nofailCarlos Martín Nieto2015-08-152-7/+32
| | | | | | | | | | | | | | | | | | When parsing user-provided regex patterns for functions, we must not fail to provide a diff just because a pattern is not well formed. Ignore it instead.
* | | Merge pull request #3383 from libgit2/cmn/http-errorEdward Thomson2015-08-151-1/+9
|\ \ \ | |/ / |/| | http: propagate the credentials callback's error code
| * | http: propagate the credentials callback's error codecmn/http-errorCarlos Martín Nieto2015-08-151-1/+9
|/ / | | | | | | | | | | | | | | | | | | | | | | When we ask for credentials, the user may choose to return EUSER to indicate that an error has happened on its end and it wants to be given back control. We must therefore pass that back to the user instead of mentioning that it was on_headers_complete() that returned an error code. Since we can, we return the exact error code from the user (other than PASSTHROUGH) since it doesn't cost anything, though using other error codes aren't recommended.
* | Merge pull request #3362 from libgit2/cmn/curl-proxyauth-anyCarlos Martín Nieto2015-08-141-0/+1
|\ \ | | | | | | curl: use the most secure auth method for the proxy
| * | curl: use the most secure auth method for the proxycmn/curl-proxyauth-anyCarlos Martín Nieto2015-08-061-0/+1
| | | | | | | | | | | | | | | | | | | | | When curl uses a proxy, it will only use Basic unless we prompt it to try to use the most secure on it has available. This is something which git did recently, and it seems like a good idea.
* | | Merge pull request #3168 from libgit2/cmn/config-txEdward Thomson2015-08-1310-18/+298
|\ \ \ | | | | | | | | Locking and transactional/atomic updates for config
| * | | config: perform unlocking via git_transactioncmn/config-txCarlos Martín Nieto2015-08-127-26/+92
| | | | | | | | | | | | | | | | | | | | This makes the API for commiting or discarding changes the same as for references.
| * | | config: expose locking via the main APICarlos Martín Nieto2015-08-124-19/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lock/unlock pair allows for the cller to lock a configuration file to avoid concurrent operations. It also allows for a transactional approach to updating a configuration file. If multiple updates must be made atomically, they can be done while the config is locked.
| * | | config: implement basic transactional supportCarlos Martín Nieto2015-08-124-12/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When a configuration file is locked, any updates made to it will be done to the in-memory copy of the file. This allows for multiple updates to happen while we hold the lock, preventing races during complex config-file manipulation.
| * | | config: write the modified file to memoryCarlos Martín Nieto2015-08-121-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of writing into the filebuf directly, make the functions to write the modified config file write into a buffer which can then be dumped into the lockfile for committing. This allows us to re-use the same code for modifying a locked configuration, as we can simply skip the last step of dumping the data to disk.
* | | | Merge pull request #3372 from libgit2/cmn/mirror-refspecEdward Thomson2015-08-122-9/+44
|\ \ \ \ | |/ / / |/| | | remote: don't confuse tag auto-follow rules with refspec matching
| * | | remote: don't confuse tag auto-follow rules with refspec matchingcmn/mirror-refspecCarlos Martín Nieto2015-08-111-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | When we're looking to update a tag, we can't stop if the tag auto-follow rules don't say to update it. The tag might still match the refspec we were given.
| * | | remote: add failing test for a mirror refspecCarlos Martín Nieto2015-08-111-5/+34
| |/ / | | | | | | | | | | | | | | | While we download the remote's remote-tracking branches, we don't download the tag. This points to the tag auto-follow rules interfering with the refspec.
* | | Merge pull request #3363 from ripdev/masterCarlos Martín Nieto2015-08-121-1/+1
|\ \ \ | |/ / |/| | Forcing libssh2 lib location in CMake
| * | Forcing libssh2 lib locationSlava Karpenko2015-08-061-1/+1
|/ / | | | | | | OS X may have libssh2 in diff locations, so CHECK_LIBRARY_EXISTS may check the wrong lib; forcing it to use a found directory.
* | Merge pull request #3360 from nodegit/master-duplicate-basename-fixEdward Thomson2015-08-054-4/+3
|\ \ | | | | | | Fix duplicate basenames to support older VS on master
| * | Fix duplicate basenames to support older VSJohn Haley2015-08-054-4/+3
|/ / | | | | | | | | | | | | With Visual Studio versions 2008 and older they ignore the full path to files and only check the basename of the file to find a collision. Additionally, having duplicate basenames can break other build tools like GYP. This fixes https://github.com/libgit2/libgit2/issues/3356
* | Merge pull request #3351 from ethomson/error_bufCarlos Martín Nieto2015-08-049-72/+149
|\ \ | | | | | | Error handling: use buffers, improved OOM handling
| * | errors: tighten up git_error_state OOMs a bit moreEdward Thomson2015-08-036-46/+86
| | | | | | | | | | | | | | | When an error state is an OOM, make sure that we treat is specially and do not try to free it.
| * | Merge remote-tracking branches 'upstream/pr/3323' and 'upstream/pr/3329'Edward Thomson2015-08-033-23/+42
| |\ \
| | * | error: store the error messages in a reusable buffercmn/error-bufferCarlos Martín Nieto2015-07-283-23/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of allocating a brand new buffer for each error string we want to store, we can use a per-thread buffer to store the error string and re-use the underlying storage. We already use the buffer to format the string, so this mostly makes that more direct.
| * | | Test: check restored oom error points to static bufferMichael Procter2015-08-031-4/+4
| | | |
| * | | Make giterr_restore aware of g_git_oom_errorMichael Procter2015-08-031-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow restoring a previously captured oom error, by detecting when the captured message pointer points to the static oom error message. This means there is no need to strdup the message in giterr_detach.
| * | | Make giterr_detach no longer publicMichael Procter2015-08-032-13/+1
| | | |
| * | | Ensure static oom error message not detachedMichael Procter2015-08-031-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Error messages that are detached are assumed to be dynamically allocated. Passing a pointer to the static oom error message can cause an attempt to free the static buffer later. This change checks if the oom error message is about to be detached and detaches a copy instead.
| * | | Add failing test for capture/restore oom errorMichael Procter2015-08-031-0/+23
|/ / /
* | | Merge pull request #3325 from libgit2/cmn/filebuf-rename-errorEdward Thomson2015-08-033-1/+35
|\ \ \ | | | | | | | | filebuf: remove lockfile upon rename errors
| * | | filebuf: remove lockfile upon rename errorscmn/filebuf-rename-errorCarlos Martín Nieto2015-07-243-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we have an error renaming the lockfile, we need to make sure that we remove it upon cleanup. For this, we need to keep track of whether we opened the file and whether the rename succeeded. If we did create the lockfile but the rename did not succeed, we remove the lockfile. This won't protect against all errors, but the most common ones (target file is open) does get handled.
| * | | filebuf: failing test for leaving the lockfile when failing to renameCarlos Martín Nieto2015-07-241-0/+27
| | | | | | | | | | | | | | | | | | | | When we fail to rename, we currently leave the lockfile laying around. This shows that behaviour.
* | | | Merge pull request #3344 from libgit2/cmn/add-unreg-submoduleEdward Thomson2015-08-032-5/+71
|\ \ \ \ | | | | | | | | | | index: stage an unregistered submodule as well
| * | | | index: stage an unregistered submodule as wellcmn/add-unreg-submoduleCarlos Martín Nieto2015-08-011-5/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We previously added logic to `_add_bypath()` to update a submodule. Go further and stage the submodule even if it's not registered to behave like git.
| * | | | index: test that an unregistered submodule gets stagedCarlos Martín Nieto2015-08-011-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we pass the path of a repository to `_bypath()`, we should behave like git and stage it as a `_COMMIT` regardless of whether it is registered a a submodule.
| * | | | index: add test for adding an old-style submodule to indexLinquize2015-08-011-0/+7
| | | | |
* | | | | Merge pull request #3348 from MrHacky/remote-path-with-tildeCarlos Martín Nieto2015-08-032-0/+4
|\ \ \ \ \ | |/ / / / |/| | | | Handle ssh:// and git:// urls containing a '~' character.
| * | | | Handle ssh:// and git:// urls containing a '~' character.Simon2015-08-032-0/+4
|/ / / / | | | | | | | | | | | | | | | | For such a path '/~/...' the leading '/' is stripped so the server will get a path starting with '~' and correctly handle it.
* | | | Merge pull request #3332 from phatblat/ben/doc-warningsCarlos Martín Nieto2015-08-018-10/+13
|\ \ \ \ | | | | | | | | | | Resolve documentation warnings
| * | | | Better param docsBen Chatelain2015-07-281-1/+3
| | | | |
| * | | | Fix remaining documentation warningsBen Chatelain2015-07-274-4/+4
| | | | |
| * | | | Add -Wdocumentation flag if supportedBen Chatelain2015-07-271-0/+1
| | | | |
| * | | | Use correct Doxygen trailing comment syntaxBen Chatelain2015-07-271-4/+4
| | | | |
| * | | | Fix @param names in doc commentsBen Chatelain2015-07-273-3/+3
| | |_|/ | |/| |
* | | | Merge pull request #3341 from stewid/pedantic-compiler-warningEdward Thomson2015-07-315-6/+6
|\ \ \ \ | | | | | | | | | | Remove extra semicolon outside of a function
| * | | | Remove extra semicolon outside of a functionStefan Widgren2015-07-315-6/+6
|/ / / / | | | | | | | | | | | | | | | | Without this change, compiling with gcc and pedantic generates warning: ISO C does not allow extra ‘;’ outside of a function.
* | | | Merge pull request #3328 from libgit2/cmn/iterator-skip-diriterEdward Thomson2015-07-292-6/+5
|\ \ \ \ | | | | | | | | | | iterator: skip over errors in diriter init