Skip to content

Commit 8449a34

Browse files
committed
Add pathspec support to GTCheckoutOptions
1 parent 494ccb6 commit 8449a34

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

ObjectiveGit/GTCheckoutOptions.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ typedef NS_OPTIONS(NSInteger, GTCheckoutNotifyFlags) {
5858

5959
@property (assign) GTCheckoutNotifyFlags notifyFlags;
6060
@property (copy) int (^notifyBlock)(GTCheckoutNotifyFlags why, NSString *path, GTDiffFile *baseline, GTDiffFile *target, GTDiffFile *workdir);
61+
62+
@property (copy) NSArray *pathSpecs;
63+
6164
@end
6265

6366
NS_ASSUME_NONNULL_END

ObjectiveGit/GTCheckoutOptions.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#import "GTCheckoutOptions.h"
1010
#import "GTDiffFile.h"
1111
#import "NSError+Git.h"
12+
#import "NSArray+StringArray.h"
1213
#import "git2.h"
1314

1415
// The type of block set in progressBlock for progress reporting
@@ -91,6 +92,8 @@ - (git_checkout_options *)git_checkoutOptions {
9192
_git_checkoutOptions.notify_payload = (__bridge void *)self.notifyBlock;
9293
}
9394

95+
_git_checkoutOptions.paths = self.pathSpecs.git_strarray;
96+
9497
return &_git_checkoutOptions;
9598
}
9699

0 commit comments

Comments
 (0)