mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 15:30:18 +00:00
PBRefController: Only set title if we have a rev
We used to unconditionally set the title of the branch to the current branch. This worked fine in most cases where the current branch was already known, but failed when you use 'gitx -c' and then switch to the HistoryView, because then the currentBranch isn't known yet. The simple fix is to check if we know it. If we don't, it'll be set later on.
This commit is contained in:
+2
-1
@@ -296,7 +296,8 @@
|
||||
- (void) selectCurrentBranch
|
||||
{
|
||||
PBGitRevSpecifier *rev = historyController.repository.currentBranch;
|
||||
[branchPopUp setTitle:[rev description]];
|
||||
if (rev)
|
||||
[branchPopUp setTitle:[rev description]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user