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:
Pieter de Bie
2009-01-19 22:20:16 +00:00
parent bad99be131
commit 971e8e5bcc
+2 -1
View File
@@ -296,7 +296,8 @@
- (void) selectCurrentBranch
{
PBGitRevSpecifier *rev = historyController.repository.currentBranch;
[branchPopUp setTitle:[rev description]];
if (rev)
[branchPopUp setTitle:[rev description]];
}
@end