-
Notifications
You must be signed in to change notification settings - Fork 280
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
Expose -moveHEAD #535
Expose -moveHEAD #535
Conversation
…veHEADToCommit:error: to the header so they can be used from apps. This seems important because I'm told the only legitimate way to move the HEAD is with these methods (and the underlying git2 functions) and NOT to delete and recreate the HEAD reference manually, so these methods must be public if client apps need to move the HEAD.
@@ -269,6 +269,22 @@ extern NSString * const GTRepositoryInitOptionsOriginURLString; | |||
/// Returns a GTReference or nil if an error occurs. | |||
- (nullable GTReference *)headReferenceWithError:(NSError **)error; | |||
|
|||
/// Move HEAD reference safely, since deleting and recreating HEAD is always wrong. | |||
/// | |||
/// reference - The new target reference for HEAD. |
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.
Style nit: could you align the -
for the args?
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.
Looks like this one was missed 😄
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.
😲
Just a style nit. Thanks! |
🤘 |
Expose move HEAD operations through public API. Includes tests.
Supersedes #515 from @wilshipley