mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
Fix getting the correct git directory
If the path already includes the .git directory then rev-parse will return "." to mean the current directory.
This commit is contained in:
@@ -61,6 +61,8 @@ NSString* PBGitRepositoryErrorDomain = @"GitXErrorDomain";
|
||||
|
||||
if ([newPath isEqualToString:@".git"])
|
||||
return [NSURL fileURLWithPath:[repositoryPath stringByAppendingPathComponent:@".git"]];
|
||||
if ([newPath isEqualToString:@"."])
|
||||
return [NSURL fileURLWithPath:repositoryPath];
|
||||
if ([newPath length] > 0)
|
||||
return [NSURL fileURLWithPath:newPath];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user