File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -231,9 +231,24 @@ public void DoubleTapped(Models.Commit commit)
231231 return ;
232232 }
233233 }
234- else if ( d . Type == Models . DecoratorType . RemoteBranchHead && firstRemoteBranch == null )
234+ else if ( d . Type == Models . DecoratorType . RemoteBranchHead )
235235 {
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+ }
237252 }
238253 }
239254
You can’t perform that action at this time.
0 commit comments