From bbd083beea1040baa4944595c3ac117623eaf63c Mon Sep 17 00:00:00 2001 From: Michael Ernst Date: Mon, 2 Sep 2024 09:59:52 -0700 Subject: [PATCH] Rename script --- .../{merge_plumelib.sh => merge_git_then_plumelib.sh} | 10 +++++----- src/scripts/merge_tools/plumelib_ort.sh | 2 +- src/scripts/merge_tools/plumelib_ort_adjacent.sh | 2 +- .../merge_tools/plumelib_ort_adjacent_ignorespace.sh | 2 +- src/scripts/merge_tools/plumelib_ort_ignorespace.sh | 2 +- src/scripts/merge_tools/plumelib_ort_imports.sh | 2 +- .../merge_tools/plumelib_ort_imports_ignorespace.sh | 2 +- src/scripts/merge_tools/plumelib_ort_version_number.sh | 2 +- .../plumelib_ort_version_number_ignorespace.sh | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) rename src/scripts/merge_tools/{merge_plumelib.sh => merge_git_then_plumelib.sh} (84%) diff --git a/src/scripts/merge_tools/merge_plumelib.sh b/src/scripts/merge_tools/merge_git_then_plumelib.sh similarity index 84% rename from src/scripts/merge_tools/merge_plumelib.sh rename to src/scripts/merge_tools/merge_git_then_plumelib.sh index 0ab32031e5..4ba5c4a9ca 100755 --- a/src/scripts/merge_tools/merge_plumelib.sh +++ b/src/scripts/merge_tools/merge_git_then_plumelib.sh @@ -1,16 +1,16 @@ #!/usr/bin/env sh -# usage: ./merge_plumelib.sh +# usage: ./merge_git_then_plumelib.sh clone_dir=$1 branch1=$2 branch2=$3 git_strategy=$4 #"-Xignore-space-change" -merge_strategy=$5 #"--only-adjacent" +plumelib_strategy=$5 #"--only-adjacent" ## Perform merge -echo "$0: Merging $branch1 and $branch2 with git_strategy=$git_strategy and merge_strategy=$merge_strategy" +echo "$0: Merging $branch1 and $branch2 with git_strategy=$git_strategy and plumelib_strategy=$plumelib_strategy" cd "$clone_dir" || (echo "$0: cannot cd to $clone_dir" ; exit 1) @@ -20,7 +20,7 @@ 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 '"$merge_strategy"' ${BASE} ${LOCAL} ${REMOTE} ${MERGED}' +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 @@ -28,7 +28,7 @@ git merge --no-edit $git_strategy "$branch2" ## Now, run Plume-lib Merging to improve the result of `git merge`. -case "$merge_strategy" in +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. all_arg="" diff --git a/src/scripts/merge_tools/plumelib_ort.sh b/src/scripts/merge_tools/plumelib_ort.sh index 54d61f8902..4b8ed6d0ca 100755 --- a/src/scripts/merge_tools/plumelib_ort.sh +++ b/src/scripts/merge_tools/plumelib_ort.sh @@ -8,4 +8,4 @@ branch1=$2 branch2=$3 git_strategy="-s ort" plumelib_strategy="" -"$MERGE_SCRIPTS_DIR"/merge_plumelib.sh "$clone_dir" "$branch1" "$branch2" "$git_strategy" "$plumelib_strategy" +"$MERGE_SCRIPTS_DIR"/merge_git_then_plumelib.sh "$clone_dir" "$branch1" "$branch2" "$git_strategy" "$plumelib_strategy" diff --git a/src/scripts/merge_tools/plumelib_ort_adjacent.sh b/src/scripts/merge_tools/plumelib_ort_adjacent.sh index 55342a7e7d..fd87e12c28 100755 --- a/src/scripts/merge_tools/plumelib_ort_adjacent.sh +++ b/src/scripts/merge_tools/plumelib_ort_adjacent.sh @@ -8,4 +8,4 @@ branch1=$2 branch2=$3 git_strategy="-s ort" plumelib_strategy="--only-adjacent" -"$MERGE_SCRIPTS_DIR"/merge_plumelib.sh "$clone_dir" "$branch1" "$branch2" "$git_strategy" "$plumelib_strategy" +"$MERGE_SCRIPTS_DIR"/merge_git_then_plumelib.sh "$clone_dir" "$branch1" "$branch2" "$git_strategy" "$plumelib_strategy" diff --git a/src/scripts/merge_tools/plumelib_ort_adjacent_ignorespace.sh b/src/scripts/merge_tools/plumelib_ort_adjacent_ignorespace.sh index fa24ea6b7c..7a8fdbf1bc 100755 --- a/src/scripts/merge_tools/plumelib_ort_adjacent_ignorespace.sh +++ b/src/scripts/merge_tools/plumelib_ort_adjacent_ignorespace.sh @@ -8,4 +8,4 @@ branch1=$2 branch2=$3 git_strategy="-s ort -Xignore-space-change" plumelib_strategy="--only-adjacent" -"$MERGE_SCRIPTS_DIR"/merge_plumelib.sh "$clone_dir" "$branch1" "$branch2" "$git_strategy" "$plumelib_strategy" +"$MERGE_SCRIPTS_DIR"/merge_git_then_plumelib.sh "$clone_dir" "$branch1" "$branch2" "$git_strategy" "$plumelib_strategy" diff --git a/src/scripts/merge_tools/plumelib_ort_ignorespace.sh b/src/scripts/merge_tools/plumelib_ort_ignorespace.sh index 7a1122a482..65002e6b1e 100755 --- a/src/scripts/merge_tools/plumelib_ort_ignorespace.sh +++ b/src/scripts/merge_tools/plumelib_ort_ignorespace.sh @@ -8,4 +8,4 @@ branch1=$2 branch2=$3 git_strategy="-s ort -Xignore-space-change" plumelib_strategy="" -"$MERGE_SCRIPTS_DIR"/merge_plumelib.sh "$clone_dir" "$branch1" "$branch2" "$git_strategy" "$plumelib_strategy" +"$MERGE_SCRIPTS_DIR"/merge_git_then_plumelib.sh "$clone_dir" "$branch1" "$branch2" "$git_strategy" "$plumelib_strategy" diff --git a/src/scripts/merge_tools/plumelib_ort_imports.sh b/src/scripts/merge_tools/plumelib_ort_imports.sh index bf0f1446c6..16714304f9 100755 --- a/src/scripts/merge_tools/plumelib_ort_imports.sh +++ b/src/scripts/merge_tools/plumelib_ort_imports.sh @@ -8,4 +8,4 @@ branch1=$2 branch2=$3 git_strategy="-s ort" plumelib_strategy="--only-imports" -"$MERGE_SCRIPTS_DIR"/merge_plumelib.sh "$clone_dir" "$branch1" "$branch2" "$git_strategy" "$plumelib_strategy" +"$MERGE_SCRIPTS_DIR"/merge_git_then_plumelib.sh "$clone_dir" "$branch1" "$branch2" "$git_strategy" "$plumelib_strategy" diff --git a/src/scripts/merge_tools/plumelib_ort_imports_ignorespace.sh b/src/scripts/merge_tools/plumelib_ort_imports_ignorespace.sh index cc75867812..3178798302 100755 --- a/src/scripts/merge_tools/plumelib_ort_imports_ignorespace.sh +++ b/src/scripts/merge_tools/plumelib_ort_imports_ignorespace.sh @@ -8,4 +8,4 @@ branch1=$2 branch2=$3 git_strategy="-s ort -Xignore-space-change" plumelib_strategy="--only-imports" -"$MERGE_SCRIPTS_DIR"/merge_plumelib.sh "$clone_dir" "$branch1" "$branch2" "$git_strategy" "$plumelib_strategy" +"$MERGE_SCRIPTS_DIR"/merge_git_then_plumelib.sh "$clone_dir" "$branch1" "$branch2" "$git_strategy" "$plumelib_strategy" diff --git a/src/scripts/merge_tools/plumelib_ort_version_number.sh b/src/scripts/merge_tools/plumelib_ort_version_number.sh index 7d039584dd..7164510eea 100755 --- a/src/scripts/merge_tools/plumelib_ort_version_number.sh +++ b/src/scripts/merge_tools/plumelib_ort_version_number.sh @@ -8,4 +8,4 @@ branch1=$2 branch2=$3 git_strategy="-s ort" plumelib_strategy="--only-version-numbers" -"$MERGE_SCRIPTS_DIR"/merge_plumelib.sh "$clone_dir" "$branch1" "$branch2" "$git_strategy" "$plumelib_strategy" +"$MERGE_SCRIPTS_DIR"/merge_git_then_plumelib.sh "$clone_dir" "$branch1" "$branch2" "$git_strategy" "$plumelib_strategy" diff --git a/src/scripts/merge_tools/plumelib_ort_version_number_ignorespace.sh b/src/scripts/merge_tools/plumelib_ort_version_number_ignorespace.sh index 0af71042ef..18813e1bc2 100755 --- a/src/scripts/merge_tools/plumelib_ort_version_number_ignorespace.sh +++ b/src/scripts/merge_tools/plumelib_ort_version_number_ignorespace.sh @@ -8,4 +8,4 @@ branch1=$2 branch2=$3 git_strategy="-s ort -Xignore-space-change" plumelib_strategy="--only-version-numbers" -"$MERGE_SCRIPTS_DIR"/merge_plumelib.sh "$clone_dir" "$branch1" "$branch2" "$git_strategy" "$plumelib_strategy" +"$MERGE_SCRIPTS_DIR"/merge_git_then_plumelib.sh "$clone_dir" "$branch1" "$branch2" "$git_strategy" "$plumelib_strategy"