mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
Check if a repository is valid
This commit is contained in:
+4
-1
@@ -138,8 +138,11 @@ static NSString* gitPath;
|
||||
|
||||
- (id) initWithURL: (NSURL*) path andRevSpecifier:(PBGitRevSpecifier*) rev
|
||||
{
|
||||
self = [self init];
|
||||
NSURL* gitDirURL = [PBGitRepository gitDirForURL:path];
|
||||
if (!gitDirURL)
|
||||
return nil;
|
||||
|
||||
self = [self init];
|
||||
[self setFileURL: gitDirURL];
|
||||
|
||||
[self setup];
|
||||
|
||||
@@ -36,6 +36,9 @@
|
||||
id document = [self documentForURL:url];
|
||||
if (!document) {
|
||||
document = [[PBGitRepository alloc] initWithURL:url andRevSpecifier:rev];
|
||||
if (!document)
|
||||
return nil;
|
||||
|
||||
[self addDocument:document];
|
||||
[document makeWindowControllers];
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user