diff --git a/GitTest_AppDelegate.m b/GitTest_AppDelegate.m index a718c03..1a5bd0a 100644 --- a/GitTest_AppDelegate.m +++ b/GitTest_AppDelegate.m @@ -12,12 +12,6 @@ @synthesize repository; -- (IBAction) clickButton:(id) sender -{ - [self.repository addCommit:@"Haaha"]; -} - - - (GitTest_AppDelegate*) init { char* a = getenv("PWD"); @@ -29,7 +23,6 @@ path = [[NSString stringWithCString:a] stringByAppendingString:@"/.git"]; self.repository = [PBGitRepository repositoryWithPath:path]; - NSLog(@"Repository is: %@", repository); return self; } diff --git a/PBGitRepository.m b/PBGitRepository.m index f1e0dbd..c62dae9 100644 --- a/PBGitRepository.m +++ b/PBGitRepository.m @@ -13,7 +13,7 @@ @implementation PBGitRepository -@synthesize commits; +@synthesize path, commits; static NSString* gitPath = @"/usr/bin/env"; + (PBGitRepository*) repositoryWithPath:(NSString*) path @@ -37,7 +37,6 @@ static NSString* gitPath = @"/usr/bin/env"; char* path = getenv("GIT_PATH"); if (path != nil) { gitPath = [NSString stringWithCString:path]; - NSLog(@"Git path is now '%@'", gitPath); return; } @@ -51,7 +50,6 @@ static NSString* gitPath = @"/usr/bin/env"; [task launch]; NSString* a = [handle readLine]; gitPath = a; - NSLog(@"Git path is now '%@'", gitPath); if (a.length == 0) { NSLog(@"Git path not found. Defaulting to /opt/pieter/bin/git"); @@ -119,6 +117,4 @@ static NSString* gitPath = @"/usr/bin/env"; return handle; } -@synthesize path; - @end