Skip to content

Commit 929f9fc

Browse files
committed
Show the branch that will be tracked when creating a tracking branch
1 parent 6f83f23 commit 929f9fc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

PBRefMenuItem.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ + (NSArray *) defaultMenuItemsForRef:(PBGitRef *)ref inRepository:(PBGitReposito
5959
[items addObject:[PBRefMenuItem separatorItem]];
6060

6161
// create branch
62-
[items addObject:[PBRefMenuItem itemWithTitle:@"Create branch…" action:@selector(createBranch:) enabled:YES]];
62+
NSString *createBranchTitle = [ref isRemoteBranch] ? [NSString stringWithFormat:@"Create branch that tracks %@", targetRefName] : @"Create branch…";
63+
[items addObject:[PBRefMenuItem itemWithTitle:createBranchTitle action:@selector(createBranch:) enabled:YES]];
6364

6465
// create tag
6566
[items addObject:[PBRefMenuItem itemWithTitle:@"Create Tag…" action:@selector(createTag:) enabled:YES]];

0 commit comments

Comments
 (0)