Unify merge_strategy decision logic in branch.rb