git: use force branch checkout to prevent cases when .gitattributes modifies
files by specific rule and then checkout is blocked by potential file conflicts.
This commit is contained in:
parent
0bc9813397
commit
c36b8f3d79
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue