Skip to content

Commit 7b01385

Browse files
author
Peter Kristensen
committed
Use the current working directory if git couldn't find it.
1 parent ce241c6 commit 7b01385

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

PBGitRepository.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,11 @@ - (BOOL)readFromURL:(NSURL *)absoluteURL ofType:(NSString *)typeName error:(NSEr
167167
}
168168

169169
[self setFileURL:gitDirURL];
170+
if (![self workingDirectory]) { // If we couldn't find the working directory, assume it's the place we were opened from.
171+
workingDirectory = [[absoluteURL path] retain];
172+
}
173+
174+
170175
[self setup];
171176
return YES;
172177
} @catch(id x) {

0 commit comments

Comments
 (0)