Skip to content

Commit 1a2fd36

Browse files
committed
Checkout reference after updating HEAD
1 parent c7b439a commit 1a2fd36

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ObjectiveGit/GTRepository+Pull.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,12 @@ - (BOOL)pullBranch:(GTBranch *)branch fromRemote:(GTRemote *)remote withOptions:
8080
message:[NSString stringWithFormat:@"Merge branch '%@'", localBranch.shortName]
8181
error:error];
8282

83-
return *error == nil;
83+
[self checkoutReference:localBranch.reference
84+
strategy:GTCheckoutStrategyForce
85+
error:error
86+
progressBlock:nil];
8487

88+
return *error == nil;
8589
} else if (analysis & GTMergeAnalysisNormal) {
8690
// Do normal merge
8791
GTTree *remoteTree = remoteCommit.tree;

0 commit comments

Comments
 (0)