Skip to content

Commit 3179090

Browse files
committed
Show unborn status in document title
1 parent 9f20ed1 commit 3179090

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Classes/Controllers/PBGitRepositoryDocument.m

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,12 @@ - (NSString *)displayName
7373
{
7474
// Build our display name depending on the current HEAD and whether it's detached or not
7575
if (self.repository.gtRepo.isHEADDetached)
76-
return [NSString localizedStringWithFormat:@"%@ (detached HEAD)", self.repository.projectName];
76+
return [NSString stringWithFormat:NSLocalizedString(@"%@ (detached HEAD)", @""), self.repository.projectName];
7777

78-
return [NSString localizedStringWithFormat:@"%@ (branch: %@)", self.repository.projectName, [self.repository.headRef description]];
78+
if (self.repository.gtRepo.isHEADUnborn)
79+
return [NSString stringWithFormat:NSLocalizedString(@"%@ (unborn HEAD)", @""), self.repository.projectName];
80+
81+
return [NSString stringWithFormat:NSLocalizedString(@"%@ (branch: %@)", @""), self.repository.projectName, self.repository.headRef.description];
7982
}
8083

8184
- (void)makeWindowControllers

0 commit comments

Comments
 (0)