更改需要快速(因此您的更改不要太多)或本地更改(因此您只关心少数地方的更改)。
否则,合并可能与重构一样多。作为一种算法,当太多事务失败并且必须重新启动时,乐观锁定根本不起作用。
从根本上说,你不能允许一家公司的 20 名程序员每天都更改代码库中 50% 的方法的名称。就此而言,如果多人总是同时在同一个地方进行重构,那么无论如何他们只是在撤消彼此的工作。
If programmers are spending a lot of time manually supervising merges, then present to your managers an opportunity to increase productivity by changing the way tasks are defined and assigned.
Also, "refactor the whole system to use factories everywhere" is not a task. "Refactor this one interface and its implementations to use factories" is a task.