# HG changeset patch # User Marcin Kuzminski # Date 2018-01-29 13:37:03 # Node ID 9f2d0b5439725b80f0ddd9dc5b8dfe5d7cc79c51 # Parent 676bf7b7a789c771f020f49cf4a06c1d6c5c72b0 git: use force branch checkout to prevent cases when .gitattributes modifies files by specific rule and then checkout is blocked by potential file conflicts. diff --git a/rhodecode/lib/vcs/backends/git/repository.py b/rhodecode/lib/vcs/backends/git/repository.py --- a/rhodecode/lib/vcs/backends/git/repository.py +++ b/rhodecode/lib/vcs/backends/git/repository.py @@ -900,10 +900,10 @@ class GitRepository(BaseRepository): # fetch proper commits for merge testing if source_ref.name != target_ref.name: if shadow_repo.get_remote_ref(source_ref.name): - shadow_repo._checkout(source_ref.name) + shadow_repo._checkout(source_ref.name, force=True) # checkout target - shadow_repo._checkout(target_ref.name) + shadow_repo._checkout(target_ref.name, force=True) shadow_repo._local_pull(self.path, target_ref.name) # Need to reload repo to invalidate the cache, or otherwise we cannot