"Resolve conflict using theirs" is extremely slow
What steps will reproduce the problem?
- Try to merge a branch with a lot of conflicts (unsure if there is any difference whether they are in binary of text files, or if LFS is involved)
- Try to resolve conflicts using MERGE_HEAD for a big number of files (100+)
What is the expected output? What do you see instead?
The resolve process is very slow. A git.exe is spawned for every file. I do not expect for resolve process to take 1+ hour for 100 files.
What version of TortoiseGit and Git are you using? On what operating system?
2.11.0 on Windows 10
Please provide any additional information below.
When merging a branch with a large number of conflicts (gamedev with Unity: we have a lot of binary files in repository), I often find resolving a lot of them en masse by selecting a large number or files and selecting "Resolve using MERGE_HEAD" from the context menu. Unfortunately, the process seems to be extremely slow - resolving 100 files in this way can take up to 1 hour!
I think the issue happens because TortoiseGit spawns a separate git.exe process for every file (or even several in sequence, from what I see in Process Explorer).
Is there any way to optimize this use case, at least for cases where there aren't any additional issues? Maybe there is some way to pre-check that the command can be run in batch mode and if it can be - pass a list of files to git checkout --theirs, or to libgit2's API instead of iterating over them internally?