Skip to content

Commit 0bd6b02

Browse files
committed
Use referenceByUpdatingTarget:message:error
1 parent 2de17e1 commit 0bd6b02

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

ObjectiveGit/GTRepository+Pull.m

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#import "GTCommit.h"
1212
#import "GTRemote.h"
13-
#import "GTSignature.h"
13+
#import "GTReference.h"
1414
#import "GTRepository+Committing.h"
1515
#import "GTRepository+RemoteOperations.h"
1616

@@ -73,11 +73,10 @@ - (BOOL)pullBranch:(GTBranch *)branch fromRemote:(GTRemote *)remote withOptions:
7373
} else if (analysis & GTMergeAnalysisFastForward ||
7474
analysis & GTMergeAnalysisUnborn) {
7575
// Do FastForward
76-
[localBranch.reference referenceByUpdatingTarget:remoteCommit.SHA committer:[self userSignatureForNow] message:[NSString stringWithFormat:@"Merge branch '%@'", localBranch.shortName] error:error];
76+
[localBranch.reference referenceByUpdatingTarget:remoteCommit.SHA message:nil error:error];
77+
BOOL checkoutSuccess = [self checkoutReference:localBranch.reference strategy:GTCheckoutStrategyForce error:error progressBlock:nil];
7778

78-
BOOL success = [self checkoutReference:localBranch.reference strategy:GTCheckoutStrategyForce error:error progressBlock:nil];
79-
80-
return success;
79+
return checkoutSuccess;
8180
} else if (analysis & GTMergeAnalysisNormal) {
8281
// Do normal merge
8382
GTTree *remoteTree = remoteCommit.tree;

0 commit comments

Comments
 (0)