Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Wrap PBGitRepository construction in the CLI proxy in a try/catch blo…

…ck to prevent DO exception console spew when the command line tool is used on a directory that isn't a Git repository.
  • Loading branch information...
commit 8a220aa695eea28d0a85538579b65d7e96ab79df 1 parent d553a72
Marc Liyanage authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 PBCLIProxy.m
6 PBCLIProxy.m
@@ -38,7 +38,11 @@ - (BOOL)openRepository:(NSURL*)repositoryPath arguments: (NSArray*) args error:(
NSURL* url = [NSURL fileURLWithPath:[repositoryPath path]];
NSArray* arguments = [NSArray arrayWithArray:args];
- PBGitRepository *document = [[PBRepositoryDocumentController sharedDocumentController] documentForLocation:url];
+ PBGitRepository *document = nil;
+ @try {
+ document = [[PBRepositoryDocumentController sharedDocumentController] documentForLocation:url];
+ }
+ @catch (NSException *e) {}
if (!document) {
if (error) {
NSString *suggestion = [PBGitBinary path] ? @"this isn't a git repository" : @"GitX can't find your git binary";
Please sign in to comment.
Something went wrong with that request. Please try again.