summaryrefslogtreecommitdiff
path: root/include/git2/errors.h
Commit message (Collapse)AuthorAgeFilesLines
* errors: add GIT_EEOF to indicate early EOFcmn/server-errorsCarlos Martín Nieto2015-05-201-0/+1
| | | | | | This can be used by tools to show mesages about failing to communicate with the server. The error message in this case will often contain the server's error message, as far as it managed to send anything.
* mkdir: walk up tree to mkdirEdward Thomson2015-01-201-0/+1
| | | | | | Walk up the tree to mkdir, which is less immediately efficient, but allows us to look at intermediate directories that may need attention.
* peel: reject bad queries with EINVALIDSPECcmn/peeling-errorsCarlos Martín Nieto2014-11-221-0/+1
| | | | | | | | | | There are some combination of objects and target types which we know cannot be fulfilled. Return EINVALIDSPEC for those to signify that there is a mismatch in the user-provided data and what the object model is capable of satisfying. If we start at a tag and in the course of peeling find out that we cannot reach a particular type, we return EPEEL.
* git_rebase_commit: drop already-picked commitsEdward Thomson2014-10-261-0/+1
| | | | | | Already cherry-picked commits should not be re-included. If all changes included in a commit exist in the upstream, then we should error with GIT_EAPPLIED.
* Introduce git_rebase to set up a rebase sessionEdward Thomson2014-10-261-0/+1
| | | | | | Introduce `git_rebase` to set up a rebase session that can then be continued. Immediately, only merge-type rebase is supported.
* Merge remote-tracking branch 'upstream/master' into cmn/describeCarlos Martín Nieto2014-09-301-16/+18
|\
| * Provide a callback for certificate validationCarlos Martín Nieto2014-09-161-0/+1
| | | | | | | | | | | | | | | | | | 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.
| * Introduce GIT_EAUTHCarlos Martín Nieto2014-06-261-0/+1
| | | | | | | | Introduce this error code to signal an authentication failure.
| * Fixed miscellaneous documentation errors.Michael Anderson2014-05-231-16/+16
| |
* | object: introduce git_describe_object()nulltoken2014-04-301-0/+1
|/
* Added cherry-pick supportJacques Germishuys2014-04-141-0/+1
|
* refs: return GIT_EMODIFIED if the ref target movedCarlos Martín Nieto2014-02-051-0/+1
| | | | | In case we loose the race to update the reference, return GIT_EMODIFIED to let the user distinguish it from other types of errors.
* Update docs for new callback return value behaviorRussell Belfer2013-12-111-16/+29
|
* Remove converting user error to GIT_EUSERRussell Belfer2013-12-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the behavior of callbacks so that the callback error code is not converted into GIT_EUSER and instead we propagate the return value through to the caller. Instead of using the giterr_capture and giterr_restore functions, we now rely on all functions to pass back the return value from a callback. To avoid having a return value with no error message, the user can call the public giterr_set_str or some such function to set an error message. There is a new helper 'giterr_set_callback' that functions can invoke after making a callback which ensures that some error message was set in case the callback did not set one. In places where the sign of the callback return value is meaningful (e.g. positive to skip, negative to abort), only the negative values are returned back to the caller, obviously, since the other values allow for continuing the loop. The hardest parts of this were in the checkout code where positive return values were overloaded as meaningful values for checkout. I fixed this by adding an output parameter to many of the internal checkout functions and removing the overload. This added some code, but it is probably a better implementation. There is some funkiness in the network code where user provided callbacks could be returning a positive or a negative value and we want to rely on that to cancel the loop. There are still a couple places where an user error might get turned into GIT_EUSER there, I think, though none exercised by the tests.
* Improve GIT_EUSER handlingRussell Belfer2013-12-111-2/+1
| | | | | | | | | | | This adds giterr_user_cancel to return GIT_EUSER and clear any error message that is sitting around. As a result of using that in places, we need to be more thorough with capturing errors that happen inside a callback when used internally. To help with that, this also adds giterr_capture and giterr_restore so that when we internally use a foreach-type function that clears errors and converts them to GIT_EUSER, it is easier to restore not just the return value, but the actual error message text.
* Introduce git_revert to revert a single commitEdward Thomson2013-12-021-0/+1
|
* error: Simplify giterr_detachVicent Marti2013-11-051-9/+6
|
* Add giterr_detach API to get and clear errorRussell Belfer2013-11-041-0/+17
| | | | | | | | There are a number of cases where it is convenient to be able to fetch and "claim" the current error string, clearing the error. This is helpful when you need to call some code that may alter the error and you want to restore it later on and/or report it via some other mechanism.
* Add attributes to filters and fix registryRussell Belfer2013-09-171-0/+1
| | | | | | | | | | | | | | | | | | The filter registry as implemented was too primitive to actually work once multiple filters were coming into play. This expands the implementation of the registry to handle multiple prioritized filters correctly. Additionally, this adds an "attributes" field to a filter that makes it really really easy to implement filters that are based on one or more attribute values. The lookup and even simple value checking can all happen automatically without custom filter code. Lastly, with the registry improvements, this fills out the filter lifecycle callbacks, with initialize and shutdown callbacks that will be called before the filter is first used and after it is last invoked. This allows for system-wide initialization and cleanup by the filter.
* Merge pull request #1856 from libgit2/cmn/no-orphansVicent Martí2013-09-171-1/+1
|\ | | | | No such thing as an orphan branch
| * No such thing as an orphan branchCarlos Martín Nieto2013-09-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | Unfortunately git-core uses the term "unborn branch" and "orphan branch" interchangeably. However, "orphan" is only really there for the checkout command, which has the `--orphan` option so it doesn't actually create the branch. Branches never have parents, so the distinction of a branch with no parents is odd to begin with. Crucially, the error messages deal with unborn branches, so let's use that.
* | Add a wrapper to provide the libssh2 error messageEtienne Samson2013-09-161-0/+1
|/
* index: report when it's lockedCarlos Martín Nieto2013-08-191-0/+1
| | | | | | | Report the index being locked with its own error code in order to be able to differentiate, as a locked index is typically the result of a crashed process or concurrent access, both of which often require user intervention to fix.
* Fixed most documentation header bugsAndreas Linde2013-06-241-1/+1
| | | | | | | | | | | Fixed a few header @param and @return typos with the help of -Wdocumentation in Xcode. The following warnings have not been fixed: common.h:213 - Not sure how the documentation format is for '...' notes.h:102 - Correct @param name but empty text notes.h:111 - Correct @param name but empty text pack.h:140 - @return missing text pack.h:148 - @return missing text
* Add typedefs on some public enumsRussell Belfer2013-05-241-2/+2
| | | | Apparently this makes things easier to bind in some languages.
* errors: Introduce EMERGECONFLICT error codenulltoken2013-01-111-0/+1
|
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* MERGE_HEAD contents iteratorEdward Thomson2013-01-031-0/+1
|
* fetchhead reading/iteratingEdward Thomson2012-12-191-0/+1
|
* errors: Introduce EINVALIDSPEC error codenulltoken2012-12-011-0/+1
|
* Push! By schu, phkelley, and congyiwu, et alPhilip Kelley2012-11-281-0/+1
|
* Rework checkout with new strategy optionsRussell Belfer2012-11-091-0/+1
| | | | | | | | | | | | | | | | | | This is a major reworking of checkout strategy options. The checkout code is now sensitive to the contents of the HEAD tree and the new options allow you to update the working tree so that it will match the index content only when it previously matched the contents of the HEAD. This allows you to, for example, to distinguish between removing files that are in the HEAD but not in the index, vs just removing all untracked files. Because of various corner cases that arise, etc., this required some additional capabilities in rmdir and other utility functions. This includes the beginnings of an implementation of code to read a partial tree into the index based on a pathspec, but that is not enabled because of the possibility of creating conflicting index entries.
* error: add GITERR_STASH error typenulltoken2012-10-261-0/+1
|
* GIT_EUNMERGEDEdward Thomson2012-10-241-0/+1
|
* errors: introduce GIT_EORPHANEDHEADnulltoken2012-10-191-0/+1
|
* gsoc-pack-objects WIPMichael Schubert2012-10-091-0/+1
|
* Make giterr_set_str publicRussell Belfer2012-09-211-0/+34
| | | | | | | There has been discussion for a while about making some set of the `giterr_set` type functions part of the public API for code that is implementing new backends to libgit2. This makes the `giterr_set_str()` and `giterr_set_oom()` functions public.
* errors: introduce GIT_EBAREREPOnulltoken2012-09-061-0/+1
|
* Diff iteratorsRussell Belfer2012-09-051-1/+1
| | | | | | | | | | | This refactors the diff output code so that an iterator object can be used to traverse and generate the diffs, instead of just the `foreach()` style with callbacks. The code has been rearranged so that the two styles can still share most functions. This also replaces `GIT_REVWALKOVER` with `GIT_ITEROVER` and uses that as a common error code for marking the end of iteration when using a iterator style of object.
* Major submodule rewriteRussell Belfer2012-08-241-0/+1
| | | | | This replaces the old submodule API with a new extended API that supports most of the things that can be done with `git submodule`.
* Update iterators for consistency across libraryRussell Belfer2012-08-031-0/+1
| | | | | | | | | | | | | | | | | This updates all the `foreach()` type functions across the library that take callbacks from the user to have a consistent behavior. The rules are: * A callback terminates the loop by returning any non-zero value * Once the callback returns non-zero, it will not be called again (i.e. the loop stops all iteration regardless of state) * If the callback returns non-zero, the parent fn returns GIT_EUSER * Although the parent returns GIT_EUSER, no error will be set in the library and `giterr_last()` will return NULL if called. This commit makes those changes across the library and adds tests for most of the iteration APIs to make sure that they follow the above rules.
* amigaos: CleanupVicent Marti2012-06-221-39/+1
|
* Fix double-defines when using GIT_OLD_ERRORSChris Young2012-06-071-1/+3
|
* ssl: check certificates against the system's trusted CAsCarlos Martín Nieto2012-05-191-0/+1
|
* errors: Rename error codesbreaking-changesVicent Martí2012-05-181-5/+6
|
* errors: Rename the generic return codesVicent Martí2012-05-181-5/+42
|
* errors: Remove old commentsVicent Martí2012-05-181-13/+0
|
* Introduce GITERR_INDEXERCarlos Martín Nieto2012-05-151-0/+1
|
* Remove old and unused error codesVicent Martí2012-05-021-104/+4
|
* error handling: move the missing parts over to the new error handlingCarlos Martín Nieto2012-04-261-0/+2
|