Skip to content

Move giterr to git_error - #4917

Merged
ethomson merged 7 commits into
masterfrom
ethomson/giterr
Jan 22, 2019
Merged

Move giterr to git_error#4917
ethomson merged 7 commits into
masterfrom
ethomson/giterr

Conversation

@ethomson

Copy link
Copy Markdown
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

ethomson commented Jan 4, 2019

Copy link
Copy Markdown
Member Author

/rebuild

4 similar comments
@ethomson

ethomson commented Jan 4, 2019

Copy link
Copy Markdown
Member Author

/rebuild

@ethomson

ethomson commented Jan 4, 2019

Copy link
Copy Markdown
Member Author

/rebuild

@ethomson

ethomson commented Jan 4, 2019

Copy link
Copy Markdown
Member Author

/rebuild

@ethomson

ethomson commented Jan 4, 2019

Copy link
Copy Markdown
Member Author

/rebuild

@ethomson

ethomson commented Jan 4, 2019

Copy link
Copy Markdown
Member Author

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

@ethomson

ethomson commented Jan 4, 2019

Copy link
Copy Markdown
Member Author

/rebuild

1 similar comment
@ethomson

ethomson commented Jan 5, 2019

Copy link
Copy Markdown
Member Author

/rebuild

@libgit2-azure-pipelines

Copy link
Copy Markdown

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

@ethomson

ethomson commented Jan 9, 2019

Copy link
Copy Markdown
Member Author

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

Comment thread include/git2/errors.h Outdated
*/
/**@{*/

#define GITERR_NONE GIT_ERROR_NONE

Copy link
Copy Markdown
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
Copy Markdown
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

pks-t commented Jan 21, 2019

Copy link
Copy Markdown
Member

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
Copy Markdown
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.

3 participants