Skip to content

Commit 1129e09

Browse files
committed
Remove isAGitDirectory:
As discussed in #524 it is not public and `[GTRepository initWithURL:error:]` should be more future safe.
1 parent fe28096 commit 1129e09

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

ObjectiveGit/GTRepository.m

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -111,21 +111,6 @@ - (void)dealloc {
111111

112112
#pragma mark API
113113

114-
+ (BOOL)isAGitDirectory:(NSURL *)directory {
115-
NSFileManager *fm = [[NSFileManager alloc] init];
116-
BOOL isDir = NO;
117-
NSURL *headFileURL = [directory URLByAppendingPathComponent:@"HEAD"];
118-
119-
if ([fm fileExistsAtPath:headFileURL.path isDirectory:&isDir] && !isDir) {
120-
NSURL *objectsDir = [directory URLByAppendingPathComponent:@"objects"];
121-
if ([fm fileExistsAtPath:objectsDir.path isDirectory:&isDir] && isDir) {
122-
return YES;
123-
}
124-
}
125-
126-
return NO;
127-
}
128-
129114
+ (instancetype)initializeEmptyRepositoryAtFileURL:(NSURL *)localFileURL options:(NSDictionary *)optionsDict error:(NSError **)error {
130115
if (!localFileURL.isFileURL || localFileURL.path == nil) {
131116
if (error != NULL) *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileWriteUnsupportedSchemeError userInfo:@{ NSLocalizedDescriptionKey: NSLocalizedString(@"Invalid file path URL to initialize repository.", @"") }];

0 commit comments

Comments
 (0)