Skip to content

Commit 8655c2d

Browse files
committed
Apply canonical formatting to refresh regressions
gitx/gitx#404 gitx/gitx#184 gitx/gitx#131
1 parent baf178b commit 8655c2d

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

‎Classes/Controllers/PBGitSidebarController.m‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,7 @@ - (PBSourceViewItem *)addRevSpec:(PBGitRevSpecifier *)rev
210210
if ([pathComponents count] < 2) {
211211
item = [PBSourceViewItem itemWithRevSpec:rev];
212212
[branches addChild:item];
213-
}
214-
else if ([[pathComponents objectAtIndex:1] isEqualToString:@"heads"])
213+
} else if ([[pathComponents objectAtIndex:1] isEqualToString:@"heads"])
215214
[branches addRev:rev toPath:[pathComponents subarrayWithRange:NSMakeRange(2, [pathComponents count] - 2)]];
216215
else if ([[rev simpleRef] hasPrefix:@"refs/tags/"])
217216
[tags addRev:rev toPath:[pathComponents subarrayWithRange:NSMakeRange(2, [pathComponents count] - 2)]];
@@ -226,8 +225,8 @@ - (void)reloadSidebarAfterReferencesChange
226225
PBGitRevSpecifier *viewedRev = self.repository.currentBranch;
227226
PBGitRevSpecifier *newHead = self.repository.headRef;
228227
BOOL followHead = [PBHistoryRefreshSelectionPolicy shouldFollowCheckedOutBranchWithStageSelected:stageSelected
229-
viewedRef:viewedRev.simpleRef
230-
previousHeadRef:self.lastKnownHeadRef.simpleRef];
228+
viewedRef:viewedRev.simpleRef
229+
previousHeadRef:self.lastKnownHeadRef.simpleRef];
231230
if (followHead && newHead && ![viewedRev isEqual:newHead]) {
232231
self.repository.currentBranch = newHead;
233232
viewedRev = newHead;

‎GitXTests/GitXCoreTests.m‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -506,11 +506,11 @@ - (void)testRapidHistoryRefreshKeepsAUniqueNonemptySnapshot
506506
XCTAssertEqual(history.commits.count, expectedCount);
507507
NSMutableArray<NSNumber *> *publishedCounts = [NSMutableArray array];
508508
id<MAKVOObservation> observation = [history addObserver:self
509-
keyPath:@"commits"
510-
options:0
511-
block:^(__unused MAKVONotification *notification) {
512-
[publishedCounts addObject:@(history.commits.count)];
513-
}];
509+
keyPath:@"commits"
510+
options:0
511+
block:^(__unused MAKVONotification *notification) {
512+
[publishedCounts addObject:@(history.commits.count)];
513+
}];
514514

515515
[self.repository forceUpdateRevisions];
516516
XCTAssertEqual(history.commits.count, expectedCount, @"Refresh should retain the previous snapshot until replacement data is ready");

0 commit comments

Comments
 (0)