File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -535,6 +535,16 @@ typedef NS_ENUM(NSInteger, GTRepositoryStateType) {
535
535
// / Returns YES if operation was successful, NO otherwise
536
536
- (BOOL )checkoutIndex : (GTIndex *)index options : (nullable GTCheckoutOptions *)options error : (NSError **)error ;
537
537
538
+ // / Checkout a tree
539
+ // /
540
+ // / targetTree - The tree to checkout.
541
+ // / options - The checkout options to use. Can be nil.
542
+ // / error - The error if one occurred. Can be NULL.
543
+ // /
544
+ // / Returns YES if operation was successful, NO otherwise
545
+ // / Note: this operation will NOT update HEAD to newly checked out tree.
546
+ - (BOOL )checkoutTree : (GTTree *)targetTree options : (nullable GTCheckoutOptions *)options error : (NSError **)error ;
547
+
538
548
// / Flush the gitattributes cache.
539
549
- (void )flushAttributesCache ;
540
550
Original file line number Diff line number Diff line change @@ -830,6 +830,10 @@ - (BOOL)checkoutReference:(G
7028
TReference *)targetReference options:(GTCheckoutOpti
830
830
return [self moveHEADToReference: targetReference error: error];
831
831
}
832
832
833
+ - (BOOL )checkoutTree : (GTTree *)targetTree options : (nullable GTCheckoutOptions *)options error : (NSError **)error {
834
+ return [self performCheckout: targetTree options: options error: error];
835
+ }
836
+
833
837
- (BOOL )checkoutIndex : (GTIndex *)index options : (GTCheckoutOptions *)options error : (NSError **)error {
834
838
int gitError = git_checkout_index (self.git_repository , index.git_index , options.git_checkoutOptions );
835
839
if (gitError < GIT_OK) {
You can’t perform that action at this time.
0 commit comments