Browse files

Show the branch that will be tracked when creating a tracking branch

  • Loading branch information...
1 parent 6f83f23 commit 929f9fc0f59389f422c280333dbdd41b2844b42e @brotherbard brotherbard committed Sep 19, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 PBRefMenuItem.m
View
3 PBRefMenuItem.m
@@ -59,7 +59,8 @@ + (NSArray *) defaultMenuItemsForRef:(PBGitRef *)ref inRepository:(PBGitReposito
[items addObject:[PBRefMenuItem separatorItem]];
// create branch
- [items addObject:[PBRefMenuItem itemWithTitle:@"Create branch…" action:@selector(createBranch:) enabled:YES]];
+ NSString *createBranchTitle = [ref isRemoteBranch] ? [NSString stringWithFormat:@"Create branch that tracks %@", targetRefName] : @"Create branch…";
+ [items addObject:[PBRefMenuItem itemWithTitle:createBranchTitle action:@selector(createBranch:) enabled:YES]];
// create tag
[items addObject:[PBRefMenuItem itemWithTitle:@"Create Tag…" action:@selector(createTag:) enabled:YES]];

0 comments on commit 929f9fc

Please sign in to comment.