Add a property to PBGitRepository that indicates if we are launching from CLI (gitx).

This commit is contained in:
André Berg
2010-03-30 15:04:05 +02:00
parent 4428373de5
commit a763dd83c5
3 changed files with 8 additions and 0 deletions
+4
View File
@@ -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];
+3
View File
@@ -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
+1
View File
@@ -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
{