Skip to content

Commit c8c7bd1

Browse files
committed
gitDirectoryURL can never be nil
It's asserted upon in libgit2.
1 parent cfb487c commit c8c7bd1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ObjectiveGit/GTRepository.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ typedef NS_ENUM(NSInteger, GTRepositoryStateType) {
156156
/// Returns nil for a bare repository.
157157
@property (nonatomic, readonly, strong) NSURL * _Nullable fileURL;
158158
/// The file URL for the repository's .git directory.
159-
@property (nonatomic, readonly, strong) NSURL * _Nullable gitDirectoryURL;
159+
@property (nonatomic, readonly, strong) NSURL *gitDirectoryURL;
160160

161161
/// Is this a bare repository (one without a working directory)?
162162
@property (nonatomic, readonly, getter = isBare) BOOL bare;

ObjectiveGit/GTRepository.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ - (NSURL *)fileURL {
648648

649649
- (NSURL *)gitDirectoryURL {
650650
const char *cPath = git_repository_path(self.git_repository);
651-
if (cPath == NULL) return nil;
651+
NSAssert(cPath, @"gitdirectory is nil");
652652

653653
NSString *path = @(cPath);
654654
NSAssert(path, @"gitdirectory is nil");

0 commit comments

Comments
 (0)