From 6d5989b40461066f1ee8d50fc9bafba68de13c7a Mon Sep 17 00:00:00 2001 From: Yifei Zhou Date: Fri, 10 Apr 2015 22:19:31 +0800 Subject: [PATCH] Updated some indentations --- ObjectiveGit/GTBranch.m | 6 +++--- ObjectiveGit/GTRepository+RemoteOperations.h | 3 +-- ObjectiveGit/GTRepository+RemoteOperations.m | 10 +++++----- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ObjectiveGit/GTBranch.m b/ObjectiveGit/GTBranch.m index b301b701d..bd6276ca1 100644 --- a/ObjectiveGit/GTBranch.m +++ b/ObjectiveGit/GTBranch.m @@ -193,9 +193,9 @@ - (GTBranch *)trackingBranchWithError:(NSError **)error success:(BOOL *)success } - (BOOL)updateTrackingBranch:(GTBranch *)trackingBranch error:(NSError **)error { - int result = GIT_ENOTFOUND; - if (trackingBranch.branchType == GTBranchTypeRemote) { - result = git_branch_set_upstream(self.reference.git_reference, [trackingBranch.name stringByReplacingOccurrencesOfString:[GTBranch remoteNamePrefix] withString:@""].UTF8String); + int result = GIT_ENOTFOUND; + if (trackingBranch.branchType == GTBranchTypeRemote) { + result = git_branch_set_upstream(self.reference.git_reference, [trackingBranch.name stringByReplacingOccurrencesOfString:[GTBranch remoteNamePrefix] withString:@""].UTF8String); } else { result = git_branch_set_upstream(self.reference.git_reference, trackingBranch.shortName.UTF8String); } diff --git a/ObjectiveGit/GTRepository+RemoteOperations.h b/ObjectiveGit/GTRepository+RemoteOperations.h index 34a8961fd..7a159a3aa 100644 --- a/ObjectiveGit/GTRepository+RemoteOperations.h +++ b/ObjectiveGit/GTRepository+RemoteOperations.h @@ -83,9 +83,8 @@ extern NSString *const GTRepositoryRemoteOptionsCredentialProvider; /// Recognized options are: /// `GTRepositoryRemoteOptionsCredentialProvider` /// error - The error if one occurred. Can be NULL. -/// progressBlock - An optional callback for monitoring progress. /// /// Returns YES if the push was successful, NO otherwise (and `error`, if provided, /// will point to an error describing what happened). -- (BOOL)deleteBranch:(GTBranch *)branch fromRemote:(GTRemote *)remote withOptions:(NSDictionary *)options error:(NSError **)error progress:(void (^)(unsigned int current, unsigned int total, size_t bytes, BOOL *stop))progressBlock; +- (BOOL)deleteBranch:(GTBranch *)branch fromRemote:(GTRemote *)remote withOptions:(NSDictionary *)options error:(NSError **)error; @end diff --git a/ObjectiveGit/GTRepository+RemoteOperations.m b/ObjectiveGit/GTRepository+RemoteOperations.m index 4f2bda0f8..000d3f88f 100644 --- a/ObjectiveGit/GTRepository+RemoteOperations.m +++ b/ObjectiveGit/GTRepository+RemoteOperations.m @@ -197,13 +197,13 @@ - (BOOL)pushBranches:(NSArray *)branches toRemote:(GTRemote *)remote withOptions } #pragma mark - Deletion (Public) -- (BOOL)deleteBranch:(GTBranch *)branch fromRemote:(GTRemote *)remote withOptions:(NSDictionary *)options error:(NSError **)error progress:(GTRemotePushTransferProgressBlock)progressBlock { - NSParameterAssert(branch != nil); - NSParameterAssert(remote != nil); +- (BOOL)deleteBranch:(GTBranch *)branch fromRemote:(GTRemote *)remote withOptions:(NSDictionary *)options error:(NSError **)error { + NSParameterAssert(branch != nil); + NSParameterAssert(remote != nil); - NSArray *refspecs = @[[NSString stringWithFormat:@":refs/heads/%@", branch.shortName]]; + NSArray *refspecs = @[ [NSString stringWithFormat:@":refs/heads/%@", branch.shortName] ]; - return [self pushRefspecs:refspecs toRemote:remote withOptions:options error:error progress:progressBlock]; + return [self pushRefspecs:refspecs toRemote:remote withOptions:options error:error progress:nil]; } #pragma mark - Push (Private)