diff --git a/PBCLIProxy.m b/PBCLIProxy.m index 4e1ec8f..385e5e7 100644 --- a/PBCLIProxy.m +++ b/PBCLIProxy.m @@ -67,6 +67,10 @@ return NO; } + NSLog(@"document = %@ at path = %@", document, repositoryPath); + + document.launchedFromCLI = YES; + if ([arguments count] > 0 && ([[arguments objectAtIndex:0] isEqualToString:@"--commit"] || [[arguments objectAtIndex:0] isEqualToString:@"-c"])) [document.windowController showCommitView:self]; diff --git a/PBGitRepository.h b/PBGitRepository.h index d793ccd..89007bd 100644 --- a/PBGitRepository.h +++ b/PBGitRepository.h @@ -33,6 +33,8 @@ enum branchFilterTypes { NSMutableDictionary *refs; PBGitRevSpecifier *_headRef; // Caching + + BOOL launchedFromCLI; } - (void) cloneRepositoryToPath:(NSString *)path bare:(BOOL)isBare; @@ -114,5 +116,6 @@ enum branchFilterTypes { @property (assign) PBGitRevSpecifier *currentBranch; @property (assign) NSInteger currentBranchFilter; @property (retain) NSMutableDictionary* refs; +@property (assign) BOOL launchedFromCLI; @end diff --git a/PBGitRepository.m b/PBGitRepository.m index 046e4e5..9ad8c24 100644 --- a/PBGitRepository.m +++ b/PBGitRepository.m @@ -25,6 +25,7 @@ static NSString * repositoryBasePath = nil; @synthesize revisionList, branches, currentBranch, refs, hasChanged, config; @synthesize currentBranchFilter; +@synthesize launchedFromCLI; - (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError **)outError {