Skip to content

Commit

Permalink
#5662: With no local commits, and the local map being unaffected by t…
Browse files Browse the repository at this point in the history
…he remote changes the strategy should be a fast-forward.
  • Loading branch information
codereader committed Jul 31, 2021
1 parent 29f44c9 commit 2353158
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/vcs/Algorithm.h
Expand Up @@ -100,7 +100,7 @@ inline RemoteStatus analyseRemoteStatus(const std::shared_ptr<Repository>& repos
{
// Remote didn't change the map, we can integrate it without conflicting the loaded map
return RemoteStatus{ status.localCommitsAhead, status.remoteCommitsAhead, _("Integrate"),
RequiredMergeStrategy::MergeRecursively };
status.localCommitsAhead == 0 ? RequiredMergeStrategy::FastForward : RequiredMergeStrategy::MergeRecursively };
}

if (mapFileHasUncommittedChanges)
Expand Down
1 change: 1 addition & 0 deletions plugins/vcs/ui/VcsStatus.cpp
Expand Up @@ -351,6 +351,7 @@ void VcsStatus::performSync(std::shared_ptr<git::Repository> repository)
catch (git::GitException& ex)
{
setRemoteStatus(git::RemoteStatus{ 0, 0, ex.what() });
wxutil::Messagebox::ShowError(ex.what());
}
}

Expand Down

0 comments on commit 2353158

Please sign in to comment.