Skip to content

Commit 5792a9d

Browse files
author
Ben Chatelain
committed
Tests caught some nullable that were missed
1 parent 289a0be commit 5792a9d

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

ObjectiveGit/GTBranch.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,13 @@ NS_ASSUME_NONNULL_BEGIN
8484
/// returns number of commits in the branch or NSNotFound if an error occurred
8585
- (NSUInteger)numberOfCommitsWithError:(NSError **)error;
8686

87-
- (NSArray *)uniqueCommitsRelativeToBranch:(GTBranch *)otherBranch error:(NSError **)error;
87+
/// Get unique commits
88+
///
89+
/// otherBranch -
90+
/// error - If not NULL, set to any error that occurs.
91+
///
92+
/// Returns a (possibly empty) array of GTCommits, or nil if an error occurs.
93+
- (nullable NSArray *)uniqueCommitsRelativeToBranch:(GTBranch *)otherBranch error:(NSError **)error;
8894

8995
/// Deletes the local branch and nils out the reference.
9096
- (BOOL)deleteWithError:(NSError **)error;

ObjectiveGit/GTDiff.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ NS_ASSUME_NONNULL_BEGIN
231231
/// available.
232232
///
233233
/// Returns a newly created `GTDiff` object or nil on error.
234-
+ (nullable instancetype)diffIndexToWorkingDirectoryInRepository:(GTRepository *)repository options:(NSDictionary *)options error:(NSError **)error;
234+
+ (nullable instancetype)diffIndexToWorkingDirectoryInRepository:(GTRepository *)repository options:(nullable NSDictionary *)options error:(NSError **)error;
235235

236236
/// Create a diff between a repository's working directory and a tree.
237237
///

ObjectiveGit/GTIndex.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,16 +199,18 @@ NS_ASSUME_NONNULL_BEGIN
199199
///
200200
/// pathspecs - An `NSString` array of path patterns. (E.g: *.c)
201201
/// If nil is passed in, all index entries will be updated.
202-
/// block - A block run each time a pathspec is matched; before the index is updated.
203-
/// The `matchedPathspec` parameter is a string indicating what the pathspec (from `pathspecs`) matched.
204-
/// If you pass in NULL in to the `pathspecs` parameter this parameter will be empty.
205-
/// The `path` parameter is a repository relative path to the file about to be updated.
202+
/// block - A block run each time a pathspec is matched; before the index is
203+
/// updated. The `matchedPathspec` parameter is a string indicating
204+
/// what the pathspec (from `pathspecs`) matched. If you pass in NULL
205+
/// in to the `pathspecs` parameter this parameter will be empty.
206+
/// The `path` parameter is a repository relative path to the file
207+
/// about to be updated.
206208
/// The `stop` parameter can be set to `YES` to abort the operation.
207209
/// Return `YES` to update the given path, or `NO` to skip it. May be nil.
208210
/// error - When something goes wrong, this parameter is set. Optional.
209211
///
210212
/// Returns `YES` in the event that everything has gone smoothly. Otherwise, `NO`.
211-
- (BOOL)updatePathspecs:(NSArray *)pathspecs error:(NSError **)error passingTest:(BOOL (^)(NSString *matchedPathspec, NSString *path, BOOL *stop))block;
213+
- (BOOL)updatePathspecs:(nullable NSArray *)pathspecs error:(NSError **)error passingTest:(nullable BOOL (^)(NSString *matchedPathspec, NSString *path, BOOL *stop))block;
212214

213215
@end
214216

0 commit comments

Comments
 (0)