From 2529c028140d683671de28fbdcbb050865b97734 Mon Sep 17 00:00:00 2001 From: Nathan Kinsinger Date: Sun, 15 Aug 2010 19:43:01 -0600 Subject: [PATCH] Fix getting the correct git directory If the path already includes the .git directory then rev-parse will return "." to mean the current directory. --- PBGitRepository.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PBGitRepository.m b/PBGitRepository.m index 55bfa30..6f93a71 100644 --- a/PBGitRepository.m +++ b/PBGitRepository.m @@ -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];