File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -231,9 +231,24 @@ public void DoubleTapped(Models.Commit commit)
231
231
return ;
232
232
}
233
233
}
234
- else if ( d . Type == Models . DecoratorType . RemoteBranchHead && firstRemoteBranch == null )
234
+ else if ( d . Type == Models . DecoratorType . RemoteBranchHead )
235
235
{
236
- firstRemoteBranch = _repo . Branches . Find ( x => x . FriendlyName == d . Name ) ;
236
+ var remoteBranch = _repo . Branches . Find ( x => x . FriendlyName == d . Name ) ;
237
+ if ( remoteBranch != null )
238
+ {
239
+ var localBranch = _repo . Branches . Find ( x => x . IsLocal && x . Upstream == remoteBranch . FullName ) ;
240
+ if ( localBranch != null )
241
+ {
242
+ if ( ! localBranch . IsCurrent )
243
+ _repo . CheckoutBranch ( localBranch ) ;
244
+ return ;
245
+ }
246
+ }
247
+
248
+ if ( firstRemoteBranch == null )
249
+ {
250
+ firstRemoteBranch = remoteBranch ;
251
+ }
237
252
}
238
253
}
239
254
You can’t perform that action at this time.
0 commit comments