Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Moved private method declarations -moveHEADToReference:error: and -mo…
…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.
  • Loading branch information
wilshipley authored and phatblat committed Nov 10, 2015
commit c916c74c69cd8ea5b408af9bc7d474547d3316c5
8 changes: 8 additions & 0 deletions ObjectiveGit/GTRepository.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,14 @@ 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
///
/// error - If not NULL, set to any error that occurs.
///
/// Returns NO if an error occurs.
- (BOOL)moveHEADToReference:(GTReference *)reference error:(NSError **)error;
- (BOOL)moveHEADToCommit:(GTCommit *)commit error:(NSError **)error;

/// Get the local branches.
///
/// error - If not NULL, set to any error that occurs.
Expand Down