Skip to content

Add revert functionality #446

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

Merged
merged 3 commits into from
Feb 23, 2020
Merged

Add revert functionality #446

merged 3 commits into from
Feb 23, 2020

Conversation

rgburke
Copy link
Contributor

@rgburke rgburke commented Jul 3, 2018

Closes #436

Copy link
Contributor

@lhchavez lhchavez left a comment

Choose a reason for hiding this comment

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

everything looks to be in the same style as MergeOptions/CheckoutOpts.

revert.go Outdated

// RevertOptions contains options for performing a revert
type RevertOptions struct {
Version uint
Copy link
Member

Choose a reason for hiding this comment

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

Version is not a user setting but decided at compile time to let libgit2 know what idea of the struct these bindings know about. It should always be set to C.GIT_REVERT_OPTIONS_VERSION. You use this for the default, but override for the case where someone passes in something. You should also prefer to use the function to initialize the default (though right now in this case it is admitedly not a complex default).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback. Version has been removed from RevertOptions. The value of version in the C struct is now always set to C.GIT_REVERT_OPTIONS_VERSION.

@lhchavez lhchavez merged commit 4bca045 into libgit2:master Feb 23, 2020
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.

git revert
3 participants