Skip to content

Commit 1473e0a

Browse files
committed
[Worktree] Prune worktrees, and lock or unlock them
Slice 3 of #675: the actions that keep the worktree list tidy, offered wherever a worktree's branch is offered, and only as far as the git in use can carry them out. - Give Reveal Worktree in Finder and Lock or Unlock a group of their own after Open Worktree and Copy name, in the menu the sidebar row and the history label share; git refuses to lock the main worktree, so there Lock is disabled and says why - Ask for an optional lock reason on a sheet; git keeps it and the row's tooltip shows it - Offer Prune on the WORKTREES header and confirm it with git's own dry run, enabling it when a worktree is prunable or its folder is gone, since moving a folder away touches nothing git watches - Offer both Lock and Unlock, and always Prune, before git 2.31, which does not report whether a worktree is locked or prunable
1 parent dd570d2 commit 1473e0a

13 files changed

Lines changed: 676 additions & 1 deletion

‎Classes/Controllers/PBGitHistoryController.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#import "PBHistorySearchMode.h"
1212

1313
@class PBGitCommit;
14+
@class PBGitWorktree;
1415
@class PBGitTree;
1516
@class PBGitRef;
1617

@@ -75,6 +76,8 @@ NS_ASSUME_NONNULL_BEGIN
7576
@interface PBGitHistoryController (PBContextMenu)
7677

7778
- (NSArray *)menuItemsForRef:(PBGitRef *)refs;
79+
- (NSArray<NSMenuItem *> *)menuItemsForWorktree:(PBGitWorktree *)worktree;
80+
- (NSArray<NSMenuItem *> *)menuItemsForWorktreeGroup;
7881
- (NSArray *)menuItemsForCommits:(NSArray<PBGitCommit *> *)commits;
7982

8083
@end

‎Classes/Controllers/PBGitHistoryController.m‎

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
#import "PBGitSidebarController.h"
3333
#import "NSString_Truncate.h"
3434
#import "PBGitCommitDateFormatter.h"
35+
#import "PBGitWorktree.h"
36+
#import "PBGitBinary.h"
3537

3638
#define kHistorySelectedDetailIndexKey @"PBHistorySelectedDetailIndex"
3739
#define kHistoryDetailViewIndex 0
@@ -65,6 +67,7 @@ @interface PBGitHistoryController () <NSTableViewDelegate, NSMenuItemValidation>
6567

6668
@property (nonatomic, assign) BOOL awaitingBranchSelection;
6769
@property (nonatomic, strong) GTOID *lastSelectedOID;
70+
@property (nonatomic, copy, nullable) NSString *gitVersion;
6871

6972
- (void)updateBranchFilterMatrix;
7073
- (void)restoreFileBrowserSelection;
@@ -78,6 +81,14 @@ @implementation PBGitHistoryController
7881
@synthesize webCommits, gitTree, commitController;
7982
@synthesize searchController;
8083
@synthesize commitList;
84+
85+
- (NSString *)gitVersion
86+
{
87+
if (!_gitVersion)
88+
_gitVersion = [[PBGitBinary version] copy];
89+
90+
return _gitVersion;
91+
}
8192
@synthesize treeController;
8293
@synthesize selectedCommits;
8394

@@ -1138,6 +1149,66 @@ @implementation PBGitHistoryController (PBContextMenu)
11381149
return items;
11391150
}
11401151

1152+
- (NSMenuItem *)menuItemWithTitle:(NSString *)title action:(SEL)action worktree:(PBGitWorktree *)worktree disabledBecause:(NSString *)reason
1153+
{
1154+
NSMenuItem *item = [NSMenuItem pb_itemWithTitle:title action:action enabled:!reason];
1155+
item.toolTip = reason;
1156+
item.representedObject = worktree;
1157+
1158+
return item;
1159+
}
1160+
1161+
- (NSArray<NSMenuItem *> *)lockMenuItemsForWorktree:(PBGitWorktree *)worktree
1162+
{
1163+
NSString *lockTitle = NSLocalizedString(@"Lock Worktree…", @"Contextual Menu Item to lock a worktree");
1164+
NSString *unlockTitle = NSLocalizedString(@"Unlock Worktree", @"Contextual Menu Item to unlock a worktree");
1165+
NSString *version = self.gitVersion;
1166+
1167+
if (worktree.isMain)
1168+
return @[ [self menuItemWithTitle:lockTitle action:@selector(lockWorktree:) worktree:worktree disabledBecause:NSLocalizedString(@"git cannot lock the main worktree", @"Contextual Menu Item tooltip for the main worktree, which cannot be locked")] ];
1169+
1170+
if (![PBGitBinary version:version isAtLeast:@PBGitWorktreeLockVersion])
1171+
return @[ [self menuItemWithTitle:lockTitle action:@selector(lockWorktree:) worktree:worktree disabledBecause:[PBGitBinary explanationForVersion:version belowRequired:@PBGitWorktreeLockVersion]] ];
1172+
1173+
NSMenuItem *lock = [self menuItemWithTitle:lockTitle action:@selector(lockWorktree:) worktree:worktree disabledBecause:nil];
1174+
NSMenuItem *unlock = [self menuItemWithTitle:unlockTitle action:@selector(unlockWorktree:) worktree:worktree disabledBecause:nil];
1175+
1176+
if (![PBGitBinary version:version isAtLeast:@PBGitWorktreeStateVersion]) {
1177+
NSLog(@"git %@ does not report whether a worktree is locked, so both lock and unlock are offered", version);
1178+
return @[ lock, unlock ];
1179+
}
1180+
1181+
return @[ worktree.isLocked ? unlock : lock ];
1182+
}
1183+
1184+
- (NSMenuItem *)revealMenuItemForWorktree:(PBGitWorktree *)worktree
1185+
{
1186+
NSString *reason = nil;
1187+
if (![[NSFileManager defaultManager] fileExistsAtPath:worktree.path])
1188+
reason = [NSString stringWithFormat:NSLocalizedString(@"The folder %@ no longer exists", @"Contextual Menu Item tooltip for a worktree whose folder is gone"), worktree.path];
1189+
1190+
return [self menuItemWithTitle:NSLocalizedString(@"Reveal Worktree in Finder", @"Contextual Menu Item to show a worktree's folder in the Finder") action:@selector(revealWorktreeInFinder:) worktree:worktree disabledBecause:reason];
1191+
}
1192+
1193+
- (NSArray<NSMenuItem *> *)menuItemsForWorktree:(PBGitWorktree *)worktree
1194+
{
1195+
return [@[ [self revealMenuItemForWorktree:worktree] ] arrayByAddingObjectsFromArray:[self lockMenuItemsForWorktree:worktree]];
1196+
}
1197+
1198+
- (NSArray<NSMenuItem *> *)menuItemsForWorktreeGroup
1199+
{
1200+
NSString *title = NSLocalizedString(@"Prune Worktrees…", @"Contextual Menu Item to prune worktrees whose folders are gone");
1201+
1202+
if (![PBGitBinary version:self.gitVersion isAtLeast:@PBGitWorktreeStateVersion])
1203+
return @[ [self menuItemWithTitle:title action:@selector(pruneWorktrees:) worktree:nil disabledBecause:nil] ];
1204+
1205+
for (PBGitWorktree *worktree in self.repository.worktrees)
1206+
if (worktree.isPrunable || ![[NSFileManager defaultManager] fileExistsAtPath:worktree.path])
1207+
return @[ [self menuItemWithTitle:title action:@selector(pruneWorktrees:) worktree:nil disabledBecause:nil] ];
1208+
1209+
return @[ [self menuItemWithTitle:title action:@selector(pruneWorktrees:) worktree:nil disabledBecause:NSLocalizedString(@"Every worktree still has its folder", @"Contextual Menu Item tooltip when no worktree can be pruned")] ];
1210+
}
1211+
11411212
- (NSArray<NSMenuItem *> *)menuItemsForRef:(PBGitRef *)ref
11421213
{
11431214
if (!ref) {
@@ -1171,6 +1242,7 @@ @implementation PBGitHistoryController (PBContextMenu)
11711242
BOOL isRemote = (ref.isRemote && !ref.isRemoteBranch);
11721243

11731244
NSString *worktreePath = [self.repository pathOfWorktreeHoldingRef:ref];
1245+
PBGitWorktree *worktree = worktreePath ? [self.repository worktreeHoldingRef:ref] : nil;
11741246

11751247
// copy ref name
11761248
NSString *copyTitle = [NSString stringWithFormat:NSLocalizedString(@"Copy name “%@”", @"Contextual Menu Item to copy the selected ref's name to the clipboard"), refName];
@@ -1191,6 +1263,11 @@ @implementation PBGitHistoryController (PBContextMenu)
11911263
[items addObject:copyItem];
11921264
[items addObject:[NSMenuItem separatorItem]];
11931265

1266+
if (worktree) {
1267+
[items addObjectsFromArray:[self menuItemsForWorktree:worktree]];
1268+
[items addObject:[NSMenuItem separatorItem]];
1269+
}
1270+
11941271
// create branch
11951272
NSString *createBranchTitle = ref.isRemoteBranch ? [NSString stringWithFormat:NSLocalizedString(@"Create Branch tracking “%@”…", @"Contextual Menu Item to create a branch tracking the selected remote branch"), refName] : NSLocalizedString(@"Create Branch…", @"Contextual Menu Item to create a new branch at the selected ref");
11961273
[items addObject:[NSMenuItem pb_itemWithTitle:createBranchTitle action:@selector(createBranch:) enabled:YES]];

‎Classes/Controllers/PBGitSidebarController.m‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ - (id)outlineView:(NSOutlineView *)outlineView objectValueForTableColumn:(NSTabl
545545

546546
- (void)updateActionMenu
547547
{
548-
[actionButton setEnabled:([[self selectedItem] ref] != nil || [[self selectedItem] isKindOfClass:[PBSourceViewGitSubmoduleItem class]])];
548+
[actionButton setEnabled:([[self selectedItem] ref] != nil || [[self selectedItem] isKindOfClass:[PBSourceViewGitSubmoduleItem class]] || [[self selectedItem] isKindOfClass:[PBSourceViewGitWorktreeItem class]])];
549549
}
550550

551551
- (void)addMenuItemsForRef:(PBGitRef *)ref toMenu:(NSMenu *)menu
@@ -568,6 +568,15 @@ - (void)addMenuItemsForSubmodule:(PBSourceViewGitSubmoduleItem *)submodule toMen
568568
[menuItem setRepresentedObject:[submodule path]];
569569
}
570570

571+
- (void)addMenuItemsForWorktreeItem:(PBSourceViewItem *)item toMenu:(NSMenu *)menu
572+
{
573+
if (![item isKindOfClass:[PBSourceViewGitWorktreeItem class]] || item.ref)
574+
return;
575+
576+
for (NSMenuItem *menuItem in [self.windowController.historyViewController menuItemsForWorktree:[(PBSourceViewGitWorktreeItem *)item worktree]])
577+
[menu addItem:menuItem];
578+
}
579+
571580
- (NSMenuItem *)actionIconItem
572581
{
573582
NSMenuItem *actionIconItem = [[NSMenuItem alloc] initWithTitle:@"" action:NULL keyEquivalent:@""];
@@ -594,6 +603,13 @@ - (NSMenu *)menuForRow:(NSInteger)row
594603
[self addMenuItemsForSubmodule:(PBSourceViewGitSubmoduleItem *)viewItem toMenu:menu];
595604
}
596605

606+
[self addMenuItemsForWorktreeItem:viewItem toMenu:menu];
607+
608+
if (viewItem == worktrees) {
609+
for (NSMenuItem *menuItem in [self.windowController.historyViewController menuItemsForWorktreeGroup])
610+
[menu addItem:menuItem];
611+
}
612+
597613
return menu;
598614
}
599615

@@ -609,6 +625,8 @@ - (void)menuNeedsUpdate:(NSMenu *)menu
609625
if ([[self selectedItem] isKindOfClass:[PBSourceViewGitSubmoduleItem class]]) {
610626
[self addMenuItemsForSubmodule:(PBSourceViewGitSubmoduleItem *)[self selectedItem] toMenu:menu];
611627
}
628+
629+
[self addMenuItemsForWorktreeItem:[self selectedItem] toMenu:menu];
612630
}
613631

614632

‎Classes/Controllers/PBGitWindowController.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ NS_ASSUME_NONNULL_BEGIN
5353
- (IBAction)checkout:(id)sender;
5454
- (IBAction)openWorktree:(id)sender;
5555
- (void)openWorktreeHoldingRef:(PBGitRef *)ref;
56+
- (IBAction)lockWorktree:(id)sender;
57+
- (IBAction)unlockWorktree:(id)sender;
58+
- (IBAction)revealWorktreeInFinder:(id)sender;
59+
- (IBAction)pruneWorktrees:(id)sender;
5660
- (IBAction)copyRefName:(id)sender;
5761
- (IBAction)createBranch:(id)sender;
5862
- (IBAction)createTag:(id)sender;

‎Classes/Controllers/PBGitWindowController.m‎

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#import "PBDiffWindowController.h"
3030
#import "PBGitStash.h"
3131
#import "PBGitCommit.h"
32+
#import "PBGitWorktree.h"
3233

3334
@interface PBGitWindowController () <NSMenuItemValidation> {
3435
__weak PBViewController *contentController;
@@ -740,6 +741,81 @@ - (void)openWorktreeHoldingRef:(PBGitRef *)ref
740741
}];
741742
}
742743

744+
- (IBAction)lockWorktree:(id)sender
745+
{
746+
PBGitWorktree *worktree = [sender representedObject];
747+
748+
NSTextField *reasonField = [NSTextField textFieldWithString:@""];
749+
reasonField.placeholderString = NSLocalizedString(@"Reason (optional)", @"Placeholder for the reason a worktree is being locked");
750+
reasonField.frame = NSMakeRect(0, 0, 300, reasonField.intrinsicContentSize.height);
751+
752+
NSAlert *alert = [[NSAlert alloc] init];
753+
alert.messageText = [NSString stringWithFormat:NSLocalizedString(@"Lock the worktree at %@?", @"Title of the sheet that locks a worktree"), worktree.path];
754+
alert.informativeText = NSLocalizedString(@"git will not prune, move or remove a locked worktree, and shows the reason to anyone who tries.", @"Explanation on the sheet that locks a worktree");
755+
alert.accessoryView = reasonField;
756+
[alert addButtonWithTitle:NSLocalizedString(@"Lock", @"Button that locks a worktree")];
757+
[alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"Cancel")];
758+
alert.window.initialFirstResponder = reasonField;
759+
760+
[alert beginSheetModalForWindow:self.window
761+
completionHandler:^(NSModalResponse returnCode) {
762+
if (returnCode != NSAlertFirstButtonReturn)
763+
return;
764+
765+
NSError *error = nil;
766+
if (![self.repository lockWorktree:worktree reason:reasonField.stringValue error:&error])
767+
[self showErrorSheet:error];
768+
}];
769+
}
770+
771+
- (IBAction)unlockWorktree:(id)sender
772+
{
773+
NSError *error = nil;
774+
if (![self.repository unlockWorktree:[sender representedObject] error:&error])
775+
[self showErrorSheet:error];
776+
}
777+
778+
- (IBAction)revealWorktreeInFinder:(id)sender
779+
{
780+
PBGitWorktree *worktree = [sender representedObject];
781+
782+
[self revealURLsInFinder:@[ [NSURL fileURLWithPath:worktree.path] ]];
783+
}
784+
785+
- (IBAction)pruneWorktrees:(id)sender
786+
{
787+
NSError *error = nil;
788+
NSString *report = [self.repository worktreePruneReportWithError:&error];
789+
if (!report) {
790+
[self showErrorSheet:error];
791+
return;
792+
}
793+
794+
NSAlert *alert = [[NSAlert alloc] init];
795+
796+
if (!report.length) {
797+
alert.messageText = NSLocalizedString(@"Nothing to prune", @"Title of the sheet when no worktree can be pruned");
798+
alert.informativeText = NSLocalizedString(@"Every worktree git knows of still has its folder.", @"Explanation when no worktree can be pruned");
799+
[alert beginSheetModalForWindow:self.window completionHandler:nil];
800+
return;
801+
}
802+
803+
alert.messageText = NSLocalizedString(@"Prune these worktrees?", @"Title of the sheet that confirms pruning worktrees");
804+
alert.informativeText = [NSString stringWithFormat:NSLocalizedString(@"git will forget these worktrees:\n\n%@", @"Explanation on the sheet that confirms pruning worktrees, followed by git's own list"), report];
805+
[alert addButtonWithTitle:NSLocalizedString(@"Prune", @"Button that prunes worktrees")];
806+
[alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"Cancel")];
807+
808+
[alert beginSheetModalForWindow:self.window
809+
completionHandler:^(NSModalResponse returnCode) {
810+
if (returnCode != NSAlertFirstButtonReturn)
811+
return;
812+
813+
NSError *pruneError = nil;
814+
if (![self.repository pruneWorktreesWithError:&pruneError])
815+
[self showErrorSheet:pruneError];
816+
}];
817+
}
818+
743819
- (IBAction)merge:(id)sender
744820
{
745821
id<PBGitRefish> refish = [self refishForSender:sender refishTypes:@[ kGitXBranchType, kGitXRemoteBranchType, kGitXCommitType, kGitXTagType ]];

‎Classes/git/PBGitRepository.h‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,15 @@ typedef NS_ENUM(NSInteger, PBGitConfigScope) {
7676

7777
- (nullable NSString *)pathOfWorktreeHoldingRef:(nullable PBGitRef *)ref;
7878
- (BOOL)isRefHeldByAnotherWorktree:(nullable PBGitRef *)ref;
79+
- (nullable PBGitWorktree *)worktreeHoldingRef:(nullable PBGitRef *)ref;
7980
- (NSArray<NSString *> *)refNamesHeldByOtherWorktrees;
8081

82+
- (BOOL)lockWorktree:(PBGitWorktree *)worktree reason:(nullable NSString *)reason error:(NSError **)error;
83+
- (BOOL)unlockWorktree:(PBGitWorktree *)worktree error:(NSError **)error;
84+
// What `git worktree prune` would remove and why, one line each; empty when nothing.
85+
- (nullable NSString *)worktreePruneReportWithError:(NSError **)error;
86+
- (BOOL)pruneWorktreesWithError:(NSError **)error;
87+
8188
- (BOOL)checkoutRefish:(id<PBGitRefish>)ref error:(NSError **)error;
8289
- (BOOL)checkoutFiles:(NSArray *)files fromRefish:(id<PBGitRefish>)ref error:(NSError **)error;
8390
- (BOOL)mergeWithRefish:(id<PBGitRefish>)ref error:(NSError **)error;

‎Classes/git/PBGitRepository.m‎

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,11 +411,63 @@ - (BOOL)isRefHeldByAnotherWorktree:(PBGitRef *)ref
411411
return [self pathOfWorktreeHoldingRef:ref] != nil;
412412
}
413413

414+
- (PBGitWorktree *)worktreeHoldingRef:(PBGitRef *)ref
415+
{
416+
for (PBGitWorktree *worktree in self.worktrees)
417+
if (!worktree.isCurrent && [worktree.branchRefName isEqualToString:ref.ref])
418+
return worktree;
419+
420+
return nil;
421+
}
422+
414423
- (NSArray<NSString *> *)refNamesHeldByOtherWorktrees
415424
{
416425
return self.worktreePathsByRefName.allKeys;
417426
}
418427

428+
- (BOOL)changeWorktreesWithArguments:(NSArray<NSString *> *)arguments failureTitle:(NSString *)title error:(NSError **)error
429+
{
430+
NSError *gitError = nil;
431+
NSString *output = [self outputOfTaskWithArguments:[@[ @"worktree" ] arrayByAddingObjectsFromArray:arguments] error:&gitError];
432+
if (!output)
433+
return PBReturnError(error, title, [self failureReasonFromTaskError:gitError orFallback:title], gitError);
434+
435+
[self reloadWorktreePaths];
436+
return YES;
437+
}
438+
439+
- (BOOL)lockWorktree:(PBGitWorktree *)worktree reason:(NSString *)reason error:(NSError **)error
440+
{
441+
NSMutableArray<NSString *> *arguments = [NSMutableArray arrayWithObject:@"lock"];
442+
if (reason.length)
443+
[arguments addObjectsFromArray:@[ @"--reason", reason ]];
444+
[arguments addObject:worktree.path];
445+
446+
return [self changeWorktreesWithArguments:arguments failureTitle:@"Lock failed" error:error];
447+
}
448+
449+
- (BOOL)unlockWorktree:(PBGitWorktree *)worktree error:(NSError **)error
450+
{
451+
return [self changeWorktreesWithArguments:@[ @"unlock", worktree.path ] failureTitle:@"Unlock failed" error:error];
452+
}
453+
454+
- (NSString *)worktreePruneReportWithError:(NSError **)error
455+
{
456+
NSError *gitError = nil;
457+
NSString *output = [self outputOfTaskWithArguments:@[ @"worktree", @"prune", @"--dry-run", @"--verbose" ] error:&gitError];
458+
if (!output) {
459+
PBReturnError(error, @"Prune failed", [self failureReasonFromTaskError:gitError orFallback:@"Prune failed"], gitError);
460+
return nil;
461+
}
462+
463+
return [output stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
464+
}
465+
466+
- (BOOL)pruneWorktreesWithError:(NSError **)error
467+
{
468+
return [self changeWorktreesWithArguments:@[ @"prune" ] failureTitle:@"Prune failed" error:error];
469+
}
470+
419471
- (void)lazyReload
420472
{
421473
if (!hasChanged)

‎Classes/git/PBGitWorktree.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
2222
@property (nonatomic, readonly, getter=isBare) BOOL bare;
2323
@property (nonatomic, readonly, getter=isDetached) BOOL detached;
2424
@property (nonatomic, readonly, getter=isCurrent) BOOL current;
25+
@property (nonatomic, readonly, getter=isMain) BOOL main;
2526

2627
@property (nonatomic, readonly, getter=isLocked) BOOL locked;
2728
@property (nonatomic, readonly, nullable) NSString *lockReason;

‎Classes/git/PBGitWorktree.m‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ @interface PBGitWorktree ()
1515
@property (nonatomic, assign, getter=isBare) BOOL bare;
1616
@property (nonatomic, assign, getter=isDetached) BOOL detached;
1717
@property (nonatomic, assign, getter=isCurrent) BOOL current;
18+
@property (nonatomic, assign, getter=isMain) BOOL main;
1819
@property (nonatomic, assign, getter=isLocked) BOOL locked;
1920
@property (nonatomic, copy, nullable) NSString *lockReason;
2021
@property (nonatomic, assign, getter=isPrunable) BOOL prunable;
@@ -88,6 +89,7 @@ + (NSString *)reasonFromValue:(NSString *)value
8889
worktree = [[PBGitWorktree alloc] init];
8990
worktree.path = [line substringFromIndex:[@"worktree " length]];
9091
worktree.current = standardizedCurrent && [worktree.path.stringByStandardizingPath isEqualToString:standardizedCurrent];
92+
worktree.main = worktrees.count == 0;
9193
[worktrees addObject:worktree];
9294
continue;
9395
}
@@ -140,6 +142,7 @@ - (BOOL)isEqual:(id)object
140142
&& self.isBare == other.isBare
141143
&& self.isDetached == other.isDetached
142144
&& self.isCurrent == other.isCurrent
145+
&& self.isMain == other.isMain
143146
&& self.isLocked == other.isLocked
144147
&& (self.lockReason == other.lockReason || [self.lockReason isEqualToString:other.lockReason])
145148
&& self.isPrunable == other.isPrunable

0 commit comments

Comments
 (0)