Skip to content

Commit 1f28a39

Browse files
committed
enhance: only navigate to upstream if current not ahead post-fetch
1 parent 46690f4 commit 1f28a39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ViewModels/Fetch.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public override async Task<bool> Sure()
8080
log.Complete();
8181

8282
var upstream = _repo.CurrentBranch?.Upstream;
83-
if (!string.IsNullOrEmpty(upstream))
83+
if (!string.IsNullOrEmpty(upstream) && _repo.CurrentBranch.TrackStatus.Ahead.Count == 0)
8484
{
8585
var upstreamHead = await new Commands.QueryRevisionByRefName(_repo.FullPath, upstream.Substring(13)).GetResultAsync();
8686
_repo.NavigateToCommit(upstreamHead, true);

0 commit comments

Comments
 (0)