diff --git a/src/scripts/merge_tools/gitmerge.sh b/src/scripts/merge_tools/gitmerge.sh index 62f441671a..79e69c1687 100755 --- a/src/scripts/merge_tools/gitmerge.sh +++ b/src/scripts/merge_tools/gitmerge.sh @@ -1,9 +1,9 @@ #!/usr/bin/env sh # usage: ./gitmerge.sh +# Merges branch2 into branch1, in , using merge strategy . # must contain a clone of a repository. # is arguments to `git merge`, including -s and possibly -X. -# Merges branch2 into branch1, in , using merge strategy . # Return code is 0 for merge success, 1 for merge failure, 2 for script failure. # For merge failure, also outputs "Conflict" and aborts the merge. diff --git a/src/scripts/merge_tools/merge_git_then_plumelib.sh b/src/scripts/merge_tools/merge_git_then_plumelib.sh index 7d670b8ff9..a51b0ba564 100755 --- a/src/scripts/merge_tools/merge_git_then_plumelib.sh +++ b/src/scripts/merge_tools/merge_git_then_plumelib.sh @@ -26,19 +26,19 @@ echo "$0: Merging $branch1 and $branch2 with git_strategy=$git_strategy and plum cd "$clone_dir" || (echo "$0: cannot cd to $clone_dir" ; exit 2) git checkout "$branch1" --force - git config --local merge.conflictstyle diff3 git config --local mergetool.prompt false -git config --local merge.tool merge-plumelib -# shellcheck disable=SC2016 -git config --local mergetool.merge-plumelib.cmd 'java-merge-tool.sh '"$plumelib_strategy"' ${BASE} ${LOCAL} ${REMOTE} ${MERGED}' -git config --local mergetool.merge-plumelib.trustExitCode true # shellcheck disable=SC2086 git merge --no-edit $git_strategy "$branch2" ## Now, run Plume-lib Merging to improve the result of `git merge`. +git config --local merge.tool merge-plumelib +# shellcheck disable=SC2016 +git config --local mergetool.merge-plumelib.cmd 'java-merge-tool.sh '"$plumelib_strategy"' ${BASE} ${LOCAL} ${REMOTE} ${MERGED}' +git config --local mergetool.merge-plumelib.trustExitCode true + case "$plumelib_strategy" in *"--no-imports"* | *"--only-adjacent"* | *"--only-annotations"* | *"--only-version-numbers"*) # The "imports" merger is not being used, so don't use the "--all" command-line option.