Skip to content

Commit 1cf25c5

Browse files
committed
Updated to clang-format 8.0.0
1 parent 03c5bea commit 1cf25c5

27 files changed

+73
-69
lines changed

.clang-format

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ AlwaysBreakBeforeMultilineStrings: false
99
AccessModifierOffset: -2
1010
ObjCSpaceBeforeProtocolList: true
1111
SortIncludes: false
12+
ObjCBinPackProtocolList: Auto
1213
---
1314
Language: Cpp
1415
---

GitUp/Application/Document.m

+2-5
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,7 @@ @interface NSWindow (OSX_10_10)
5656
- (void)setTitleVisibility:(NSWindowTitleVisibility)visibility;
5757
@end
5858

59-
@interface Document () <NSToolbarDelegate, NSTextFieldDelegate, GCLiveRepositoryDelegate,
60-
GIWindowControllerDelegate, GIMapViewControllerDelegate, GISnapshotListViewControllerDelegate, GIUnifiedReflogViewControllerDelegate,
61-
GICommitListViewControllerDelegate, GICommitRewriterViewControllerDelegate, GICommitSplitterViewControllerDelegate,
62-
GIConflictResolverViewControllerDelegate>
59+
@interface Document () <NSToolbarDelegate, NSTextFieldDelegate, GCLiveRepositoryDelegate, GIWindowControllerDelegate, GIMapViewControllerDelegate, GISnapshotListViewControllerDelegate, GIUnifiedReflogViewControllerDelegate, GICommitListViewControllerDelegate, GICommitRewriterViewControllerDelegate, GICommitSplitterViewControllerDelegate, GIConflictResolverViewControllerDelegate>
6360
@end
6461

6562
static NSDictionary* _helpPlist = nil;
@@ -1981,7 +1978,7 @@ - (IBAction)saveSettings:(id)sender {
19811978
[NSApp endSheet:_settingsWindow];
19821979
[_settingsWindow orderOut:nil];
19831980

1984-
[_repository setUserInfo:(_indexDiffsButton.state ? @(YES) : @(NO))forKey:kRepositoryUserInfoKey_IndexDiffs];
1981+
[_repository setUserInfo:(_indexDiffsButton.state ? @(YES) : @(NO)) forKey:kRepositoryUserInfoKey_IndexDiffs];
19851982
}
19861983

19871984
@end

GitUpKit/Components/GIDiffContentsViewController.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ - (NSView*)tableView:(NSTableView*)tableView viewForTableColumn:(NSTableColumn*)
631631
label = [label stringByAppendingFormat:@" (%@%@)", _StringFromFileMode(delta.oldFile.mode), _StringFromFileMode(delta.newFile.mode)];
632632
}
633633
if (oldPathRange.length || newPathRange.length) {
634-
NSDictionary* attributes = @{ NSUnderlineStyleAttributeName : @(NSUnderlineStyleSingle) };
634+
NSDictionary* attributes = @{NSUnderlineStyleAttributeName : @(NSUnderlineStyleSingle)};
635635
NSMutableAttributedString* string = [[NSMutableAttributedString alloc] initWithString:label attributes:nil];
636636
[string beginEditing];
637637
[string setAttributes:attributes range:oldPathRange];

GitUpKit/Core/GCDiff-Tests.m

+4-3
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,10 @@ - (void)testDiffs {
128128
for (GCDiffDelta* delta in diff.deltas) {
129129
GCDiffPatch* patch = [self.repository makePatchForDiffDelta:delta isBinary:NULL error:NULL];
130130
XCTAssertNotNil(patch);
131-
[patch enumerateUsingBeginHunkHandler:^(NSUInteger oldLineNumber, NSUInteger oldLineCount, NSUInteger newLineNumber, NSUInteger newLineCount) {
132-
++count; // 2 x 1 hunks
133-
}
131+
[patch
132+
enumerateUsingBeginHunkHandler:^(NSUInteger oldLineNumber, NSUInteger oldLineCount, NSUInteger newLineNumber, NSUInteger newLineCount) {
133+
++count; // 2 x 1 hunks
134+
}
134135
lineHandler:^(GCLineDiffChange change, NSUInteger oldLineNumber, NSUInteger newLineNumber, const char* contentBytes, NSUInteger contentLength) {
135136
++count; // 2 + 1 lines
136137
}

GitUpKit/Core/GCDiff.m

+5-5
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,11 @@ - (GCDiffPatch*)makePatch:(BOOL*)isBinary error:(NSError**)error {
217217

218218
- (NSString*)description {
219219
static char modes[] = {' ', 'T', 'B', 'X', 'L', 'C'}; // WARNING: Must match GCFileModeFromMode
220-
static char status[] = {// WARNING: Must match GCFileDiffChange
221-
' ', 'I', '?', 'X',
222-
'A', 'D', 'M',
223-
'R', 'C', 'T',
224-
'!'};
220+
static char status[] = { // WARNING: Must match GCFileDiffChange
221+
' ', 'I', '?', 'X',
222+
'A', 'D', 'M',
223+
'R', 'C', 'T',
224+
'!'};
225225
return [NSString stringWithFormat:@"%c \"%s\" (%c) -> \"%s\" (%c)", status[_FileDiffChangeFromStatus(_private->status)],
226226
_private->old_file.path, modes[GCFileModeFromMode(_private->old_file.mode)],
227227
_private->new_file.path, modes[GCFileModeFromMode(_private->new_file.mode)]];

GitUpKit/Core/GCFunctions.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ BOOL GCGitOIDFromSHA1Prefix(NSString* prefix, git_oid* oid, NSError** error) {
9595
}
9696

9797
NSString* GCUserFromSignature(const git_signature* signature) {
98-
return [NSString stringWithFormat:@"%@ <%s>", [NSString stringWithUTF8String:signature->name], signature->email];
98+
return [NSString stringWithFormat:@"%@ <%@>", @(signature->name), @(signature->email)];
9999
}
100100

101101
// We can't use -[NSString fileSystemRepresentation] as it returns decomposed UTF8 while everything in Git is composed UTF8

GitUpKit/Core/GCHistory.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ - (BOOL)iterateWithCommitBlock:(void (^)(GCHistoryCommit* commit, BOOL* stop))bl
459459
// Keep generating commit rows following parents (respectively children)
460460
if (GC_POINTER_LIST_COUNT(previousRow)) {
461461
__block BOOL success = NO;
462-
BOOL (^commitBlock)
462+
BOOL(^commitBlock)
463463
(GCHistoryCommit*) = ^(GCHistoryCommit* commit) {
464464
XLOG_DEBUG_CHECK(!COMMIT_IS_PROCESSED(commit));
465465
BOOL ready = YES;
@@ -777,7 +777,7 @@ - (BOOL)_reloadHistory:(GCHistory*)history
777777
}
778778

779779
// Find all other tips
780-
BOOL (^enumerateBlock)
780+
BOOL(^enumerateBlock)
781781
(git_reference*) = ^(git_reference* reference) {
782782
GCReference* referenceObject = nil;
783783
if (git_reference_type(reference) != GIT_REF_SYMBOLIC) { // Skip symbolic refs like "remote/origin/HEAD"

GitUpKit/Core/GCLiveRepository.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ - (void)_undoOperationWithReason:(NSString*)reason beforeSnapshot:(GCSnapshot*)b
786786

787787
if (!success) { // In case of error, put a dummy operation on the undo stack since we *must* put something, but pop it at the next runloop iteration
788788
[[_undoManager prepareWithInvocationTarget:self] _undoOperationWithReason:reason beforeSnapshot:beforeSnapshot afterSnapshot:afterSnapshot checkoutIfNeeded:checkoutIfNeeded ignore:YES];
789-
[_undoManager performSelector:(self.undoManager.isRedoing ? @selector(undo) : @selector(redo))withObject:nil afterDelay:0.0];
789+
[_undoManager performSelector:(self.undoManager.isRedoing ? @selector(undo) : @selector(redo)) withObject:nil afterDelay:0.0];
790790
if ([self.delegate respondsToSelector:@selector(repository:undoOperationDidFailWithError:)]) {
791791
[self.delegate repository:self undoOperationDidFailWithError:error];
792792
}

GitUpKit/Core/GCPrivate.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ extern int git_submodule_foreach_block(git_repository* repo, int (^block)(git_su
316316
@end
317317

318318
@interface GCRepository (GCReference_Private)
319-
- (id)findReferenceWithFullName:(NSString*)fullname class:(Class) class error:(NSError**)error;
319+
- (id)findReferenceWithFullName:(NSString*)fullname class:(Class)class error:(NSError**)error;
320320
- (BOOL)refreshReference:(GCReference*)reference error:(NSError**)error;
321321
- (BOOL)enumerateReferencesWithOptions:(GCReferenceEnumerationOptions)options error:(NSError**)error usingBlock:(BOOL (^)(git_reference* reference))block;
322322
- (BOOL)loadTargetOID:(git_oid*)oid fromReference:(git_reference*)reference error:(NSError**)error;

GitUpKit/Core/GCReference.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ - (NSComparisonResult)nameCompare:(GCReference*)reference {
8383

8484
@implementation GCRepository (GCReference_Private)
8585

86-
- (id)findReferenceWithFullName:(NSString*)fullname class:(Class) class error:(NSError**)error {
86+
- (id)findReferenceWithFullName:(NSString*)fullname class:(Class)class error:(NSError**)error {
8787
XLOG_DEBUG_CHECK([class isSubclassOfClass:[GCReference class]]);
8888
git_reference* reference;
8989
CALL_LIBGIT2_FUNCTION_RETURN(nil, git_reference_lookup, &reference, self.private, fullname.UTF8String);
9090
return [[class alloc] initWithRepository:self reference:reference];
9191
}
9292

93-
- (BOOL)refreshReference : (GCReference*)reference error : (NSError**)error {
93+
- (BOOL)refreshReference:(GCReference*)reference error:(NSError**)error {
9494
git_reference* newReference;
9595
CALL_LIBGIT2_FUNCTION_RETURN(NO, git_reference_lookup, &newReference, self.private, git_reference_name(reference.private));
9696
[reference updateReference:newReference];

GitUpKit/Core/GCRepository+HEAD.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ - (GCReference*)lookupHEADReference:(NSError**)error {
4343

4444
- (GCCommit*)lookupHEAD:(GCLocalBranch**)currentBranch error:(NSError**)error {
4545
git_reference* headReference = NULL;
46-
git_commit* headCommit = [self loadHEADCommit:(currentBranch ? &headReference : NULL)error:error];
46+
git_commit* headCommit = [self loadHEADCommit:(currentBranch ? &headReference : NULL) error:error];
4747
if (headCommit == NULL) {
4848
return NULL;
4949
}
@@ -56,7 +56,7 @@ - (GCCommit*)lookupHEAD:(GCLocalBranch**)currentBranch error:(NSError**)error {
5656
- (BOOL)lookupHEADCurrentCommit:(GCCommit**)commit branch:(GCLocalBranch**)branch error:(NSError**)error {
5757
git_commit* headCommit = NULL;
5858
git_reference* headReference = NULL;
59-
if (![self loadHEADCommit:(commit ? &headCommit : NULL)resolvedReference:(branch ? &headReference : NULL)error:error]) {
59+
if (![self loadHEADCommit:(commit ? &headCommit : NULL) resolvedReference:(branch ? &headReference : NULL)error:error]) {
6060
return NO;
6161
}
6262
if (commit) {

GitUpKit/Core/GCRepository-Tests.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ - (void)testOpen {
4444
repo1 = nil;
4545

4646
// Test read-only
47-
XCTAssertTrue([[NSFileManager defaultManager] setAttributes:@{ NSFilePosixPermissions : @(0500) } ofItemAtPath:[path stringByAppendingPathComponent:@".git"] error:NULL]);
47+
XCTAssertTrue([[NSFileManager defaultManager] setAttributes:@{NSFilePosixPermissions : @(0500)} ofItemAtPath:[path stringByAppendingPathComponent:@".git"] error:NULL]);
4848
GCRepository* repo2 = [[GCRepository alloc] initWithExistingLocalRepository:path error:NULL];
4949
XCTAssertNotNil(repo2);
5050
XCTAssertTrue(repo2.readOnly);
5151
repo2 = nil;
52-
XCTAssertTrue([[NSFileManager defaultManager] setAttributes:@{ NSFilePosixPermissions : @(0700) } ofItemAtPath:[path stringByAppendingPathComponent:@".git"] error:NULL]);
52+
XCTAssertTrue([[NSFileManager defaultManager] setAttributes:@{NSFilePosixPermissions : @(0700)} ofItemAtPath:[path stringByAppendingPathComponent:@".git"] error:NULL]);
5353

5454
// Destroy repository
5555
XCTAssertTrue([[NSFileManager defaultManager] removeItemAtPath:path error:NULL]);

GitUpKit/Core/GCRepository.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ - (BOOL)runHookWithName:(NSString*)name arguments:(NSArray*)arguments standardIn
344344
XLOG_VERBOSE(@"Executed '%@' hook in %.3f seconds", name, CFAbsoluteTimeGetCurrent() - time);
345345
if (status != 0) {
346346
if (error) {
347-
NSString* string = [[[NSString alloc] initWithData:(stderrData.length ? stderrData : stdoutData)encoding:NSUTF8StringEncoding] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
347+
NSString* string = [[[NSString alloc] initWithData:(stderrData.length ? stderrData : stdoutData) encoding:NSUTF8StringEncoding] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
348348
XLOG_DEBUG_CHECK(string);
349349
NSDictionary* info = @{
350350
NSLocalizedDescriptionKey : [NSString stringWithFormat:@"Hook '%@' exited with non-zero status (%i)", name, status],

GitUpKit/Core/GCTestCase.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ - (GCRepository*)createLocalRepositoryAtPath:(NSString*)path bare:(BOOL)bare {
6363
}
6464

6565
- (void)destroyLocalRepository:(GCRepository*)repository {
66-
XCTAssert([[NSFileManager defaultManager] removeItemAtPath:(repository.bare ? repository.repositoryPath : repository.workingDirectoryPath)error:NULL]);
66+
XCTAssert([[NSFileManager defaultManager] removeItemAtPath:(repository.bare ? repository.repositoryPath : repository.workingDirectoryPath) error:NULL]);
6767
}
6868

6969
- (NSString*)_runCLTWithPath:(NSString*)path arguments:(NSArray*)arguments currentDirectory:(NSString*)currentDirectory environment:(NSDictionary*)environment {

GitUpKit/Interface/GIGraphView.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ - (void)_selectNextSiblingNode {
411411

412412
- (void)_selectDefaultNode {
413413
GCHistoryCommit* headCommit = _graph.history.HEADCommit;
414-
[self _setSelectedNode:(headCommit ? [_graph nodeForCommit:headCommit] : nil)display:YES scroll:YES notify:YES];
414+
[self _setSelectedNode:(headCommit ? [_graph nodeForCommit:headCommit] : nil) display:YES scroll:YES notify:YES];
415415
}
416416

417417
- (void)_showContextualMenuForNode:(GINode*)node {

GitUpKit/Interface/GISplitDiffView.m

+16-15
Original file line numberDiff line numberDiff line change
@@ -179,21 +179,22 @@ - (CGFloat)updateLayoutForWidth:(CGFloat)width {
179179
}
180180
}
181181
};
182-
[self.patch enumerateUsingBeginHunkHandler:^(NSUInteger oldLineNumber, NSUInteger oldLineCount, NSUInteger newLineNumber, NSUInteger newLineCount) {
183-
NSString* string = [[NSString alloc] initWithFormat:@"@@ -%lu,%lu +%lu,%lu @@", oldLineNumber, oldLineCount, newLineNumber, newLineCount];
184-
CFAttributedStringRef attributedString = CFAttributedStringCreate(kCFAllocatorDefault, (CFStringRef)string, GIDiffViewAttributes);
185-
CTLineRef line = CTLineCreateWithAttributedString(attributedString);
186-
CFRelease(attributedString);
187-
188-
GISplitDiffLine* diffLine = [[GISplitDiffLine alloc] initWithType:kDiffLineType_Separator];
189-
diffLine.leftString = string;
190-
diffLine.leftLine = line; // Transfer ownership to GISplitDiffLine
191-
[_lines addObject:diffLine];
192-
193-
addedCount = 0;
194-
deletedCount = 0;
195-
startIndex = NSNotFound;
196-
}
182+
[self.patch
183+
enumerateUsingBeginHunkHandler:^(NSUInteger oldLineNumber, NSUInteger oldLineCount, NSUInteger newLineNumber, NSUInteger newLineCount) {
184+
NSString* string = [[NSString alloc] initWithFormat:@"@@ -%lu,%lu +%lu,%lu @@", oldLineNumber, oldLineCount, newLineNumber, newLineCount];
185+
CFAttributedStringRef attributedString = CFAttributedStringCreate(kCFAllocatorDefault, (CFStringRef)string, GIDiffViewAttributes);
186+
CTLineRef line = CTLineCreateWithAttributedString(attributedString);
187+
CFRelease(attributedString);
188+
189+
GISplitDiffLine* diffLine = [[GISplitDiffLine alloc] initWithType:kDiffLineType_Separator];
190+
diffLine.leftString = string;
191+
diffLine.leftLine = line; // Transfer ownership to GISplitDiffLine
192+
[_lines addObject:diffLine];
193+
194+
addedCount = 0;
195+
deletedCount = 0;
196+
startIndex = NSNotFound;
197+
}
197198
lineHandler:^(GCLineDiffChange change, NSUInteger oldLineNumber, NSUInteger newLineNumber, const char* contentBytes, NSUInteger contentLength) {
198199
NSString* string;
199200
if (contentBytes[contentLength - 1] != '\n') {

GitUpKit/Interface/GIUnifiedDiffView.m

+8-7
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,15 @@ - (void)didUpdatePatch {
147147
}
148148
}
149149
};
150-
[self.patch enumerateUsingBeginHunkHandler:^(NSUInteger oldLineNumber, NSUInteger oldLineCount, NSUInteger newLineNumber, NSUInteger newLineCount) {
151-
CFStringRef string = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("@@ -%lu,%lu +%lu,%lu @@\n"), oldLineNumber, oldLineCount, newLineNumber, newLineCount);
152-
[self _addLineWithString:string change:NSNotFound oldLineNumber:oldLineNumber newLineNumber:newLineNumber contentBytes:NULL contentLength:0];
153-
CFRelease(string);
150+
[self.patch
151+
enumerateUsingBeginHunkHandler:^(NSUInteger oldLineNumber, NSUInteger oldLineCount, NSUInteger newLineNumber, NSUInteger newLineCount) {
152+
CFStringRef string = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("@@ -%lu,%lu +%lu,%lu @@\n"), oldLineNumber, oldLineCount, newLineNumber, newLineCount);
153+
[self _addLineWithString:string change:NSNotFound oldLineNumber:oldLineNumber newLineNumber:newLineNumber contentBytes:NULL contentLength:0];
154+
CFRelease(string);
154155

155-
deletedIndex = NSNotFound;
156-
addedIndex = NSNotFound;
157-
}
156+
deletedIndex = NSNotFound;
157+
addedIndex = NSNotFound;
158+
}
158159
lineHandler:^(GCLineDiffChange change, NSUInteger oldLineNumber, NSUInteger newLineNumber, const char* contentBytes, NSUInteger contentLength) {
159160
CFStringRef string;
160161
if (contentBytes[contentLength - 1] != '\n') {

GitUpKit/Utilities/GIAppKit.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ - (void)splitView:(NSSplitView*)splitView resizeSubviewsWithOldSize:(NSSize)oldS
368368
// Using -setPosition:ofDividerAtIndex: from inside this method confuses Core Animation on 10.8.
369369
if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber10_9) {
370370
NSView* view = splitView.subviews.firstObject;
371-
[splitView setPosition:(splitView.vertical ? view.frame.size.width : view.frame.size.height)ofDividerAtIndex:0];
371+
[splitView setPosition:(splitView.vertical ? view.frame.size.width : view.frame.size.height) ofDividerAtIndex:0];
372372
} else {
373373
NSView* view1 = splitView.subviews[0];
374374
NSView* view2 = splitView.subviews[1];

GitUpKit/Utilities/GILinkButton.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ - (void)drawRect:(NSRect)dirtyRect {
7979
NSMutableDictionary* attributes = [[NSMutableDictionary alloc] init];
8080
[attributes setObject:style forKey:NSParagraphStyleAttributeName];
8181
[attributes setValue:_textFont forKey:NSFontAttributeName];
82-
[attributes setValue:(_highlighted ? _alternateLinkColor : _linkColor)forKey:NSForegroundColorAttributeName];
82+
[attributes setValue:(_highlighted ? _alternateLinkColor : _linkColor) forKey:NSForegroundColorAttributeName];
8383
[_link drawInRect:self.bounds withAttributes:attributes];
8484
}
8585

GitUpKit/Views/GICommitRewriterViewController.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ - (IBAction)cancel:(id)sender {
300300
[self.delegate commitRewriterViewControllerShouldCancel:self];
301301
}
302302

303-
- (IBAction) continue:(id)sender {
303+
- (IBAction)continue:(id)sender {
304304
if (self.repository.indexConflicts.count) {
305305
[self presentAlertWithType:kGIAlertType_Stop title:NSLocalizedString(@"You must resolve conflicts before continuing!", nil) message:nil];
306306
return;

GitUpKit/Views/GICommitSplitterViewController.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ - (IBAction)cancel:(id)sender {
514514
[self.delegate commitSplitterViewControllerShouldCancel:self];
515515
}
516516

517-
- (IBAction) continue:(id)sender {
517+
- (IBAction)continue:(id)sender {
518518
[self.windowController runModalView:_messageView
519519
withInitialFirstResponder:self.messageTextView
520520
completionHandler:^(BOOL success) {

GitUpKit/Views/GIConfigViewController.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ - (void)_undoWriteOptionWithLevel:(GCConfigLevel)level variable:(NSString*)varia
298298
[self.repository notifyRepositoryChanged];
299299
} else { // In case of error, put a dummy operation on the undo stack since we *must* put something, but pop it at the next runloop iteration
300300
[[self.undoManager prepareWithInvocationTarget:self] _undoWriteOptionWithLevel:level variable:variable value:value ignore:YES];
301-
[self.undoManager performSelector:(self.undoManager.isRedoing ? @selector(undo) : @selector(redo))withObject:nil afterDelay:0.0];
301+
[self.undoManager performSelector:(self.undoManager.isRedoing ? @selector(undo) : @selector(redo)) withObject:nil afterDelay:0.0];
302302
[self presentError:error];
303303
}
304304
}
@@ -317,9 +317,9 @@ - (void)_promptOption:(GCConfigOption*)option {
317317
if (name.length && value.length) {
318318
NSError* error;
319319
GCConfigOption* currentOption = option ? option : [self.repository readConfigOptionForLevel:kGCConfigLevel_Local variable:name error:&error];
320-
if ((currentOption || ([error.domain isEqualToString:GCErrorDomain] && (error.code == kGCErrorCode_NotFound))) && [self.repository writeConfigOptionForLevel:(option ? option.level : kGCConfigLevel_Local)variable:name withValue:value error:&error]) {
320+
if ((currentOption || ([error.domain isEqualToString:GCErrorDomain] && (error.code == kGCErrorCode_NotFound))) && [self.repository writeConfigOptionForLevel:(option ? option.level : kGCConfigLevel_Local) variable:name withValue:value error:&error]) {
321321
[self.undoManager setActionName:NSLocalizedString(@"Edit Configuration", nil)];
322-
[[self.undoManager prepareWithInvocationTarget:self] _undoWriteOptionWithLevel:(option ? option.level : kGCConfigLevel_Local)variable:name value:currentOption.value ignore:NO]; // TODO: We should really use the built-in undo mechanism from GCLiveRepository
322+
[[self.undoManager prepareWithInvocationTarget:self] _undoWriteOptionWithLevel:(option ? option.level : kGCConfigLevel_Local) variable:name value:currentOption.value ignore:NO]; // TODO: We should really use the built-in undo mechanism from GCLiveRepository
323323
[self.repository notifyRepositoryChanged];
324324

325325
if (!option) {

GitUpKit/Views/GIConflictResolverViewController.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ - (IBAction)cancel:(id)sender {
165165
[_delegate conflictResolverViewControllerShouldCancel:self];
166166
}
167167

168-
- (IBAction) continue:(id)sender {
168+
- (IBAction)continue:(id)sender {
169169
[_delegate conflictResolverViewControllerDidFinish:self];
170170
}
171171

0 commit comments

Comments
 (0)