Skip to content

Commit a041bfa

Browse files
author
Ben Chatelain
committed
GTReflogEntry nullability
1 parent 4a00e48 commit a041bfa

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

ObjectiveGit/GTReflogEntry+Private.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#import "GTReflogEntry.h"
1010
#import "git2/types.h"
1111

12+
NS_ASSUME_NONNULL_BEGIN
13+
1214
@interface GTReflogEntry ()
1315

1416
/// Initializes the receiver with the underlying reflog entry. Designated initializer.
@@ -17,6 +19,8 @@
1719
/// reflog - The reflog in which the entry resides. Cannot be nil.
1820
///
1921
/// Returns the initialized object.
20-
- (id)initWithGitReflogEntry:(const git_reflog_entry *)entry reflog:(GTReflog *)reflog NS_DESIGNATED_INITIALIZER;
22+
- (nullable instancetype)initWithGitReflogEntry:(const git_reflog_entry *)entry reflog:(GTReflog *)reflog NS_DESIGNATED_INITIALIZER;
2123

2224
@end
25+
26+
NS_ASSUME_NONNULL_END

ObjectiveGit/GTReflogEntry.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
@interface GTReflogEntry : NSObject
1616

1717
/// The OID of the ref before the entry.
18-
@property (nonatomic, readonly, strong) GTOID *previousOID;
18+
@property (nonatomic, readonly, strong, nullable) GTOID *previousOID;
1919

2020
/// The OID of the ref when the entry was made.
21-
@property (nonatomic, readonly, strong) GTOID *updatedOID;
21+
@property (nonatomic, readonly, strong, nullable) GTOID *updatedOID;
2222

2323
/// The person who committed the entry.
24-
@property (nonatomic, readonly, strong) GTSignature *committer;
24+
@property (nonatomic, readonly, strong, nullable) GTSignature *committer;
2525

2626
/// The message associated with the entry.
27-
@property (nonatomic, readonly, copy) NSString *message;
27+
@property (nonatomic, readonly, copy, nullable) NSString *message;
2828

2929
@end

ObjectiveGit/GTReflogEntry.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ @implementation GTReflogEntry
2727

2828
#pragma mark Lifecycle
2929

30-
- (id)initWithGitReflogEntry:(const git_reflog_entry *)entry reflog:(GTReflog *)reflog {
30+
- (instancetype)initWithGitReflogEntry:(const git_reflog_entry *)entry reflog:(GTReflog *)reflog {
3131
NSParameterAssert(entry != NULL);
3232
NSParameterAssert(reflog != nil);
3333

0 commit comments

Comments
 (0)