Skip to content

Commit

Permalink
Rename script
Browse files Browse the repository at this point in the history
  • Loading branch information
mernst authored Sep 2, 2024
1 parent d657e1e commit bbd083b
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#!/usr/bin/env sh

# usage: ./merge_plumelib.sh <clone_dir> <branch-1> <branch-2> <git_strategy> <merge_strategy>
# usage: ./merge_git_then_plumelib.sh <clone_dir> <branch-1> <branch-2> <git_strategy> <plumelib_strategy>

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)

Expand All @@ -20,15 +20,15 @@ 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
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=""
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/plumelib_ort.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/plumelib_ort_adjacent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/plumelib_ort_ignorespace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/plumelib_ort_imports.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/plumelib_ort_version_number.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit bbd083b

Please sign in to comment.