Skip to content

Commit 38a58c3

Browse files
committed
When working with a bare repository, there is no working directory
1 parent 7f9d3b1 commit 38a58c3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Classes/git/PBGitRepository.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,11 @@ - (void)forceUpdateRevisions
163163

164164
- (NSString *)projectName
165165
{
166-
NSString* result = [self.workingDirectory lastPathComponent];
166+
NSString *result = [self.workingDirectory lastPathComponent];
167+
168+
if (!result)
169+
result = self.gitURL.lastPathComponent;
170+
167171
return result;
168172
}
169173

0 commit comments

Comments
 (0)