Skip to content

Commit

Permalink
Show HEAD in the sidebar if it's detached
Browse files Browse the repository at this point in the history
  • Loading branch information
tiennou committed Feb 13, 2015
1 parent e05a628 commit 65ebec8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Classes/git/PBGitRepository.m
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,11 @@ - (void) reloadRefs

NSError* error = nil;
NSArray* allRefs = [self.gtRepo referenceNamesWithError:&error];

if ([self.gtRepo isHEADDetached]) {
// Add HEAD when we're detached
allRefs = [allRefs arrayByAddingObject:@"HEAD"];
}

// load all named refs
NSMutableOrderedSet *oldBranches = [self.branchesSet mutableCopy];
Expand Down

0 comments on commit 65ebec8

Please sign in to comment.