diff --git a/PBGitRepository.m b/PBGitRepository.m index de39cb09e..a8919f3b4 100644 --- a/PBGitRepository.m +++ b/PBGitRepository.m @@ -188,7 +188,8 @@ - (PBGitRevSpecifier*) headRef NSString* branch = [self parseSymbolicReference: @"HEAD"]; if (branch && [branch hasPrefix:@"refs/heads/"]) return [[PBGitRevSpecifier alloc] initWithRef:[PBGitRef refFromString:branch]]; - return nil; + + return [[PBGitRevSpecifier alloc] initWithRef:[PBGitRef refFromString:@"HEAD"]]; } // Returns either this object, or an existing, equal object