You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Relocate context menu building to the history controller
Since most impacted controllers have a direct reference to it, it makes
more sense to use that instead of carrying a dedicated controller with
required ivars and a protocol.
NSString *stashPopTitle = [NSStringstringWithFormat:NSLocalizedString(@"Pop %@", @"Contextual Menu Item to pop the selected stash ref"), targetRefName];
NSString *stashApplyTitle = [NSStringstringWithFormat:NSLocalizedString(@"Apply %@", @"Contextual Menu Item to apply the selected stash ref"), targetRefName];
NSString *stashDropTitle = [NSStringstringWithFormat:NSLocalizedString(@"Drop %@", @"Contextual Menu Item to drop the selected stash ref"), targetRefName];
NSString *checkoutTitle = [NSStringstringWithFormat:NSLocalizedString(@"Checkout “%@”", @"Contextual Menu Item to check out the selected ref"), refName];
? [NSStringstringWithFormat:NSLocalizedString(@"Create Branch tracking “%@”…", @"Contextual Menu Item to create a branch tracking the selected remote branch"), refName]
943
+
: NSLocalizedString(@"Create Branch…", @"Contextual Menu Item to create a new branch at the selected ref");
[items addObject:[NSMenuItempb_itemWithTitle:NSLocalizedString(@"Create Tag…", @"Contextual Menu Item to create a tag at the selected ref") action:@selector(createTag:) enabled:YES]];
948
+
949
+
// view tag info
950
+
if (ref.isTag) {
951
+
[items addObject:[NSMenuItempb_itemWithTitle:NSLocalizedString(@"View Tag Info…", @"Contextual Menu Item to view Information about the selected tag") action:@selector(showTagInfoSheet:) enabled:YES]];
952
+
}
953
+
954
+
// Diff
955
+
NSString *diffTitle = [NSStringstringWithFormat:NSLocalizedString(@"Diff with “%@”", @"Contextual Menu Item to view a diff between the selected ref and HEAD"), headRefName];
? NSLocalizedString(@"Rebase", @"Inactive Contextual Menu Item for rebasing")
968
+
: [NSStringstringWithFormat:NSLocalizedString(@"Rebase ”%@“ onto “%@”", @"Contextual Menu Item to rebase HEAD onto the selected ref"), headRefName, refName];
? [NSStringstringWithFormat:NSLocalizedString(@"Pull “%@” and Update “%@”", @"Contextual Menu Item to pull the remote and update the selected branch"), remoteName, headRefName]
989
+
: NSLocalizedString(@"Pull", @"Inactive Contextual Menu Item for pulling");
NSString *pushTitle = [NSStringstringWithFormat:NSLocalizedString(@"Push Updates to “%@”", @"Contextual Menu Item to push updates of the selected ref to he named remote"), remoteName];
[items addObject:[NSMenuItempb_itemWithTitle:NSLocalizedString(@"Push", @"Inactive Contextual Menu Item for pushing") action:nilenabled:NO]];
1000
+
}
1001
+
else {
1002
+
// push to default remote
1003
+
BOOL hasDefaultRemote = NO;
1004
+
if (!ref.isTag && hasRemote) {
1005
+
hasDefaultRemote = YES;
1006
+
NSString *pushTitle = [NSStringstringWithFormat:NSLocalizedString(@"Push “%@” to “%@”", @"Contextual Menu Item to push a ref to a specific remote"), refName, remoteName];
NSString *pushToTitle = [NSStringstringWithFormat:NSLocalizedString(@"Push “%@” to", @"Contextual Menu Submenu Item containing the remotes the selected ref can be pushed to"), refName];
[items addObject:[NSMenuItempb_itemWithTitle:NSLocalizedString(@"Checkout Commit", @"Contextual Menu Item to check out the selected commit") action:@selector(checkout:) enabled:YES]];
1062
+
[items addObject:[NSMenuItemseparatorItem]];
1063
+
1064
+
[items addObject:[NSMenuItempb_itemWithTitle:NSLocalizedString(@"Create Branch…", @"Contextual Menu Item to create a branch at the selected commit") action:@selector(createBranch:) enabled:YES]];
1065
+
[items addObject:[NSMenuItempb_itemWithTitle:NSLocalizedString(@"Create Tag…", @"Contextual Menu Item to create a tag at the selected commit") action:@selector(createTag:) enabled:YES]];
1066
+
[items addObject:[NSMenuItemseparatorItem]];
1067
+
}
1068
+
1069
+
[items addObject:[NSMenuItempb_itemWithTitle:NSLocalizedString(@"Copy SHA", @"Contextual Menu Item to copy the selected commits’ full SHA(s)") action:@selector(copySHA:) enabled:YES]];
1070
+
[items addObject:[NSMenuItempb_itemWithTitle:NSLocalizedString(@"Copy short SHA", @"Contextual Menu Item to copy the selected commits’ short SHA(s)") action:@selector(copyShortName:) enabled:YES]];
1071
+
[items addObject:[NSMenuItempb_itemWithTitle:NSLocalizedString(@"Copy Patch", @"Contextual Menu Item to copy the selected commits as patch(es)") action:@selector(copyPatch:) enabled:YES]];
1072
+
1073
+
if (isSingleCommitSelection) {
1074
+
NSString *diffTitle = [NSStringstringWithFormat:NSLocalizedString(@"Diff with “%@”", @"Contextual Menu Item to view a diff between the selected commit and HEAD"), headBranchName];
? NSLocalizedString(@"Merge Commit", @"Inactive Contextual Menu Item for merging commits")
1081
+
: [NSStringstringWithFormat:NSLocalizedString(@"Merge Commit into “%@”", @"Contextual Menu Item to merge the selected commit into HEAD"), headBranchName];
? NSLocalizedString(@"Cherry Pick Commit", @"Inactive Contextual Menu Item for cherry-picking commits")
1087
+
: [NSStringstringWithFormat:NSLocalizedString(@"Cherry Pick Commit to “%@”", @"Contextual Menu Item to cherry-pick the selected commit on top of HEAD"), headBranchName];
? NSLocalizedString(@"Rebase Commit", @"Inactive Contextual Menu Item for rebasing onto commits")
1093
+
: [NSStringstringWithFormat:NSLocalizedString(@"Rebase “%@” onto Commit", @"Contextual Menu Item to rebase the HEAD branch onto the selected commit"), headBranchName];
0 commit comments