Skip to content

Commit 261d619

Browse files
committed
Documentation
1 parent 24fb88d commit 261d619

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

ObjectiveGit/GTCheckoutOptions.h

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,51 @@ typedef NS_OPTIONS(NSInteger, GTCheckoutNotifyFlags) {
4343
};
4444

4545
@interface GTCheckoutOptions : NSObject
46+
47+
/// Create a checkout options object.
48+
///
49+
/// Since there are many places where we can checkout data, this object allow us
50+
/// to centralize all the various behaviors that checkout allow.
51+
///
52+
/// @param strategy The checkout strategy to use.
53+
/// @param notifyFlags The checkout events that will be notified via `notifyBlock`.
54+
/// @param progressBlock A block that will be called for each checkout step.
55+
/// @param notifyBlock A block that will be called for each event, @see `notifyFlags`.
56+
///
57+
/// @return A newly-initialized GTCheckoutOptions object.
4658
+ (instancetype)checkoutOptionsWithStrategy:(GTCheckoutStrategyType)strategy notifyFlags:(GTCheckoutNotifyFlags)notifyFlags progressBlock:(nullable void (^)(NSString *path, NSUInteger completedSteps, NSUInteger totalSteps))progressBlock notifyBlock:(nullable int (^)(GTCheckoutNotifyFlags why, NSString *path, GTDiffFile *baseline, GTDiffFile *target, GTDiffFile *workdir))notifyBlock;
4759

60+
/// Create a checkout options object.
61+
/// @see +checkoutOptionsWithStrategy:notifyFlags:progressBlock:notifyBlock:
4862
+ (instancetype)checkoutOptionsWithStrategy:(GTCheckoutStrategyType)strategy notifyFlags:(GTCheckoutNotifyFlags)notifyFlags notifyBlock:(int (^)(GTCheckoutNotifyFlags why, NSString *path, GTDiffFile *baseline, GTDiffFile *target, GTDiffFile *workdir))notifyBlock;
4963

64+
/// Create a checkout options object.
65+
/// @see +checkoutOptionsWithStrategy:notifyFlags:progressBlock:notifyBlock:
5066
+ (instancetype)checkoutOptionsWithStrategy:(GTCheckoutStrategyType)strategy progressBlock:(void (^)(NSString *path, NSUInteger completedSteps, NSUInteger totalSteps))progressBlock;
5167

68+
/// Create a checkout options object.
69+
/// @see +checkoutOptionsWithStrategy:notifyFlags:progressBlock:notifyBlock:
5270
+ (instancetype)checkoutOptionsWithStrategy:(GTCheckoutStrategyType)strategy;
5371

72+
/// Get the underlying git_checkout_options struct.
73+
///
74+
/// @return <#return value description#>
5475
- (git_checkout_options *)git_checkoutOptions NS_RETURNS_INNER_POINTER;
5576

77+
/// The checkout strategy to use.
5678
@property (assign) GTCheckoutStrategyType strategy;
79+
80+
/// The checkout progress block that was passed in.
5781
@property (copy) void (^progressBlock)(NSString *path, NSUInteger completedSteps, NSUInteger totalSteps);
5882

83+
/// The notification flags currently enabled.
5984
@property (assign) GTCheckoutNotifyFlags notifyFlags;
85+
86+
/// The checkout notification block that was passed in.
6087
@property (copy) int (^notifyBlock)(GTCheckoutNotifyFlags why, NSString *path, GTDiffFile *baseline, GTDiffFile *target, GTDiffFile *workdir);
6188

62-
@property (copy) NSArray *pathSpecs;
89+
/// An array of strings used to restrict what will be checked out.
90+
@property (copy) NSArray <NSString *> *pathSpecs;
6391

6492
@end
6593

0 commit comments

Comments
 (0)