Skip to content

Commit

Permalink
Add pathspec support to GTCheckoutOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
tiennou committed Jun 28, 2016
1 parent 494ccb6 commit 8449a34
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ObjectiveGit/GTCheckoutOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ typedef NS_OPTIONS(NSInteger, GTCheckoutNotifyFlags) {

@property (assign) GTCheckoutNotifyFlags notifyFlags;
@property (copy) int (^notifyBlock)(GTCheckoutNotifyFlags why, NSString *path, GTDiffFile *baseline, GTDiffFile *target, GTDiffFile *workdir);

@property (copy) NSArray *pathSpecs;

@end

NS_ASSUME_NONNULL_END
3 changes: 3 additions & 0 deletions ObjectiveGit/GTCheckoutOptions.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#import "GTCheckoutOptions.h"
#import "GTDiffFile.h"
#import "NSError+Git.h"
#import "NSArray+StringArray.h"
#import "git2.h"

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

_git_checkoutOptions.paths = self.pathSpecs.git_strarray;

return &_git_checkoutOptions;
}

Expand Down

0 comments on commit 8449a34

Please sign in to comment.