Skip to content

Commit

Permalink
Fix rowanj#317: Reinstate ability to delete refs/remotes/*
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanj committed May 15, 2014
1 parent 3be5541 commit 904557a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Classes/Views/PBRefMenuItem.m
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ + (NSArray *) defaultMenuItemsForRef:(PBGitRef *)ref inRepository:(PBGitReposito
[items addObject:[PBRefMenuItem separatorItem]];
{
NSString *deleteTitle = [NSString stringWithFormat:@"Delete %@", targetRefName];
BOOL deleteEnabled = !(isDetachedHead || [ref isRemote] || isHead);
if ([ref isRemote]) {
deleteTitle = [NSString stringWithFormat:@"Remove %@", targetRefName];
}
BOOL deleteEnabled = !(isDetachedHead || isHead);
PBRefMenuItem *deleteItem = [PBRefMenuItem itemWithTitle:deleteTitle action:@selector(showDeleteRefSheet:) enabled:deleteEnabled];
[items addObject:deleteItem];
}
Expand Down

0 comments on commit 904557a

Please sign in to comment.