-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move giterr
to git_error
#4917
Move giterr
to git_error
#4917
Conversation
/rebuild |
4 similar comments
/rebuild |
/rebuild |
/rebuild |
/rebuild |
(Apologies for the spam, I'm debugging the rebuilder) |
/rebuild |
1 similar comment
/rebuild |
Okay, @ethomson, I started to rebuild this pull request as build #1159. |
d8a55eb
to
6709856
Compare
Updating to fix some conflicts; I'll likely merge this soonish to unblock us for a release since I'm not hearing any yelling. |
include/git2/errors.h
Outdated
*/ | ||
/**@{*/ | ||
|
||
#define GITERR_NONE GIT_ERROR_NONE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An alternative would be to use const int
, which would allow to mark those as GIT_DEPRECATED.
Last time I checked, compiler support for deprecating macros wasn't standardized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clever. Done.
6612b8b
to
e429fd6
Compare
That's a lot of changes :) But I'm all for it, so thanks for doing it. |
Move to the `git_error` name in error-related functions, deprecating the `giterr` functions. This means, for example, that `giterr_last` is now `git_error_last`. The old names are retained for compatibility. This only updates the public API; internal API and function usage remains unchanged.
Replace the `GITERR` values with a `const int` to deprecate error values.
Move to the `git_error` name in the internal API for error-related functions.
Update GITERR and giterr usages in the static code analysis tools to use the new names.
e429fd6
to
a27a4de
Compare
Rebased onto master, since this touched so many places, there were a great many conflicts. And surely, upon merging this, I will unleash a great many more conflicts to the world. Sorry everyone. |
Much like #4807, refactor
giterr
functions and enums to match more closely with our naming conventions. This moves thegiterr_
functions togit_error_
, while providing proxies with the old, now-deprecated names, for backward compatibility. Similarly, this moves theGITERR_
enums toGIT_ERROR_
(while again providing backcompat).