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) {
535535// / Returns YES if operation was successful, NO otherwise
536536- (BOOL )checkoutIndex : (GTIndex *)index options : (nullable GTCheckoutOptions *)options error : (NSError **)error ;
537537
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+
538548// / Flush the gitattributes cache.
539549- (void )flushAttributesCache ;
540550
Original file line number Diff line number Diff line change @@ -830,6 +830,10 @@ - (BOOL)checkoutReference:(GTReference *)targetReference options:(GTCheckoutOpti
830830 return [self moveHEADToReference: targetReference error: error];
831831}
832832
833+ - (BOOL )checkoutTree : (GTTree *)targetTree options : (nullable GTCheckoutOptions *)options error : (NSError **)error {
834+ return [self performCheckout: targetTree options: options error: error];
835+ }
836+
833837- (BOOL )checkoutIndex : (GTIndex *)index options : (GTCheckoutOptions *)options error : (NSError **)error {
834838 int gitError = git_checkout_index (self.git_repository , index.git_index , options.git_checkoutOptions );
835839 if (gitError < GIT_OK) {
You can’t perform that action at this time.
0 commit comments