|
12 | 12 | @class GTOID; |
13 | 13 | @class GTSignature; |
14 | 14 |
|
| 15 | +NS_ASSUME_NONNULL_BEGIN |
| 16 | + |
15 | 17 | /// A `GTBlameHunk` is an object that provides authorship info for a set of lines in a `GTBlame`. |
16 | 18 | @interface GTBlameHunk : NSObject |
17 | 19 |
|
18 | 20 | /// Designated initializer. |
19 | | -- (instancetype)initWithGitBlameHunk:(git_blame_hunk)hunk NS_DESIGNATED_INITIALIZER; |
| 21 | +/// |
| 22 | +/// hunk - A git_blame_hunk to wrap. May not be NULL. |
| 23 | +/// |
| 24 | +/// Returns a blame hunk, or nil if initialization failed. |
| 25 | +- (nullable instancetype)initWithGitBlameHunk:(git_blame_hunk)hunk NS_DESIGNATED_INITIALIZER; |
20 | 26 |
|
21 | 27 | /// A NSRange where `location` is the (1 based) starting line number, |
22 | 28 | /// and `length` is the number of lines in the hunk. |
23 | 29 | @property (nonatomic, readonly) NSRange lines; |
24 | 30 |
|
25 | 31 | /// The OID of the commit where this hunk was last changed. |
26 | | -@property (nonatomic, readonly, copy) GTOID *finalCommitOID; |
| 32 | +@property (nonatomic, readonly, copy, nullable) GTOID *finalCommitOID; |
27 | 33 |
|
28 | 34 | /// The signature of the commit where this hunk was last changed. |
29 | | -@property (nonatomic, readonly) GTSignature *finalSignature; |
| 35 | +@property (nonatomic, readonly, nullable) GTSignature *finalSignature; |
30 | 36 |
|
31 | 37 | /// The path of the file in the original commit. |
32 | 38 | @property (nonatomic, readonly, copy) NSString *originalPath; |
|
39 | 45 | @property (nonatomic, readonly) git_blame_hunk git_blame_hunk; |
40 | 46 |
|
41 | 47 | @end |
| 48 | + |
| 49 | +NS_ASSUME_NONNULL_END |
0 commit comments