Skip to content
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

Merged
merged 7 commits into from
Jan 22, 2019
Merged

Move giterr to git_error #4917

merged 7 commits into from
Jan 22, 2019

Conversation

ethomson
Copy link
Member

Much like #4807, refactor giterr functions and enums to match more closely with our naming conventions. This moves the giterr_ functions to git_error_, while providing proxies with the old, now-deprecated names, for backward compatibility. Similarly, this moves the GITERR_ enums to GIT_ERROR_ (while again providing backcompat).

@ethomson
Copy link
Member Author

ethomson commented Jan 4, 2019

/rebuild

4 similar comments
@ethomson
Copy link
Member Author

ethomson commented Jan 4, 2019

/rebuild

@ethomson
Copy link
Member Author

ethomson commented Jan 4, 2019

/rebuild

@ethomson
Copy link
Member Author

ethomson commented Jan 4, 2019

/rebuild

@ethomson
Copy link
Member Author

ethomson commented Jan 4, 2019

/rebuild

@ethomson
Copy link
Member Author

ethomson commented Jan 4, 2019

(Apologies for the spam, I'm debugging the rebuilder)

@ethomson
Copy link
Member Author

ethomson commented Jan 4, 2019

/rebuild

1 similar comment
@ethomson
Copy link
Member Author

ethomson commented Jan 5, 2019

/rebuild

@libgit2-azure-pipelines
Copy link

Okay, @ethomson, I started to rebuild this pull request as build #1159.

@ethomson
Copy link
Member Author

ethomson commented Jan 9, 2019

Updating to fix some conflicts; I'll likely merge this soonish to unblock us for a release since I'm not hearing any yelling.

*/
/**@{*/

#define GITERR_NONE GIT_ERROR_NONE
Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clever. Done.

@ethomson ethomson force-pushed the ethomson/giterr branch 4 times, most recently from 6612b8b to e429fd6 Compare January 11, 2019 11:54
@pks-t
Copy link
Member

pks-t commented Jan 21, 2019

That's a lot of changes :) But I'm all for it, so thanks for doing it. giterr has always annoyed me in the past.

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.
@ethomson
Copy link
Member Author

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.

@ethomson ethomson merged commit 635693d into master Jan 22, 2019
@pks-t pks-t mentioned this pull request Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants