Skip to content

Commit

Permalink
Merge branch 'adjacent-plus-plumelib' of github.com:mernst/AST-Mergin…
Browse files Browse the repository at this point in the history
…g-Evaluation into adjacent-plus-plumelib
  • Loading branch information
mernst committed Sep 22, 2024
2 parents 22f829e + 324858f commit 8167673
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 23 deletions.
4 changes: 0 additions & 4 deletions src/scripts/merge_tools/gitmerge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,22 @@ cd "$clone_dir" || { echo "$0: cannot cd to $clone_dir"; exit 2; }

if [ -n "$VERBOSE" ] ; then
echo "$0: about to run: git checkout $branch1 in $(pwd)"
echo "$0: about to run: git checkout $branch1 in $(pwd)" >&2
fi
git checkout "$branch1" --force
if [ -n "$VERBOSE" ] ; then
echo "$0: ran: git checkout $branch1 in $(pwd)"
echo "$0: ran: git checkout $branch1 in $(pwd)" >&2
fi
git config --local merge.conflictstyle diff3
git config --local mergetool.prompt false

echo "$0: about to run: git merge --no-edit $git_strategy $branch2 in $(pwd)"
echo "$0: about to run: git merge --no-edit $git_strategy $branch2 in $(pwd)" >&2

# shellcheck disable=SC2086
git merge --no-edit $git_strategy "$branch2"
retVal=$?

if [ -n "$VERBOSE" ] ; then
echo "$0: ran: git merge --no-edit $git_strategy $branch2 in $(pwd)"
echo "$0: ran: git merge --no-edit $git_strategy $branch2 in $(pwd)" >&2
fi

# report conflicts
Expand Down
9 changes: 0 additions & 9 deletions src/scripts/merge_tools/merge_git_then_plumelib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,23 @@ cd "$clone_dir" || { echo "$0: cannot cd to $clone_dir"; exit 2; }

if [ -n "$VERBOSE" ] ; then
echo "$0: about to run: git checkout $branch1 in $(pwd)"
echo "$0: about to run: git checkout $branch1 in $(pwd)" >&2
fi
git checkout "$branch1" --force
if [ -n "$VERBOSE" ] ; then
echo "$0: ran: git checkout $branch1 in $(pwd)"
echo "$0: ran: git checkout $branch1 in $(pwd)" >&2
fi
git config --local merge.conflictstyle diff3
git config --local mergetool.prompt false

if [ -n "$VERBOSE" ] ; then
echo "$0: about to run: git merge --no-edit $git_strategy $branch2 in $(pwd)"
echo "$0: about to run: git merge --no-edit $git_strategy $branch2 in $(pwd)" >&2
fi

# shellcheck disable=SC2086
git merge --no-edit $git_strategy "$branch2"

if [ -n "$VERBOSE" ] ; then
echo "$0: ran: git merge --no-edit $git_strategy $branch2 in $(pwd)"
echo "$0: ran: git merge --no-edit $git_strategy $branch2 in $(pwd)" >&2
fi

## Now, run Plume-lib Merging to improve the result of `git merge`.
Expand All @@ -79,10 +75,8 @@ esac

if [ -n "$VERBOSE" ] ; then
echo "$0: about to run: git-mergetool.sh $all_arg --tool=merge-plumelib in $(pwd)"
echo "$0: about to run: git-mergetool.sh $all_arg --tool=merge-plumelib in $(pwd)" >&2
git-mergetool.sh --verbose $all_arg --tool=merge-plumelib
echo "$0: ran: git-mergetool.sh $all_arg --tool=merge-plumelib in $(pwd)"
echo "$0: ran: git-mergetool.sh $all_arg --tool=merge-plumelib in $(pwd)" >&2
else
git-mergetool.sh $all_arg --tool=merge-plumelib
fi
Expand All @@ -93,17 +87,14 @@ if [ -z "$diffs" ]; then
git add .
if [ -n "$VERBOSE" ] ; then
echo "$0: about to run: git commit in $(pwd)"
echo "$0: about to run: git commit in $(pwd)" >&2
fi
git commit -m "Resolved conflicts by calling: git-mergetool.sh $all_arg --tool=merge-plumelib"
if [ -n "$VERBOSE" ] ; then
echo "$0: ran: git commit in $(pwd)"
echo "$0: ran: git commit in $(pwd)" >&2
fi
exit 0
fi
echo "$0: exiting with status 1"
echo "$0: exiting with status 1" >&2
echo "$0: diffs=$diffs"
echo "$0: Conflict after running in $(pwd):"
echo " git merge --no-edit $git_strategy $branch2"
Expand Down
9 changes: 0 additions & 9 deletions src/scripts/merge_tools/merge_script_then_plumelib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,23 @@ cd "$clone_dir" || { echo "$0: cannot cd to $clone_dir"; exit 2; }

if [ -n "$VERBOSE" ] ; then
echo "$0: about to run: git checkout $branch1 in $(pwd)"
echo "$0: about to run: git checkout $branch1 in $(pwd)" >&2
fi
git checkout "$branch1" --force
if [ -n "$VERBOSE" ] ; then
echo "$0: ran: git checkout $branch1 in $(pwd)"
echo "$0: ran: git checkout $branch1 in $(pwd)" >&2
fi
git config --local merge.conflictstyle diff3
git config --local mergetool.prompt false

if [ -n "$VERBOSE" ] ; then
echo "$0: about to run: $merge_script $clone_dir $branch1 $branch2 in $(pwd)"
echo "$0: about to run: $merge_script $clone_dir $branch1 $branch2 in $(pwd)" >&2
fi

# shellcheck disable=SC2086
$merge_script "$clone_dir" "$branch1" "$branch2"

if [ -n "$VERBOSE" ] ; then
echo "$0: ran: $merge_script $clone_dir $branch1 $branch2 in $(pwd)"
echo "$0: ran: $merge_script $clone_dir $branch1 $branch2 in $(pwd)" >&2
fi

## Now, run Plume-lib Merging to improve the result of `$merge_script`.
Expand All @@ -80,12 +76,10 @@ esac

if [ -n "$VERBOSE" ] ; then
echo "$0: about to run: git-mergetool.sh $all_arg --tool=merge-plumelib in $(pwd)"
echo "$0: about to run: git-mergetool.sh $all_arg --tool=merge-plumelib in $(pwd)" >&2
fi
git-mergetool.sh $all_arg --tool=merge-plumelib
if [ -n "$VERBOSE" ] ; then
echo "$0: ran: git-mergetool.sh $all_arg --tool=merge-plumelib in $(pwd)"
echo "$0: ran: git-mergetool.sh $all_arg --tool=merge-plumelib in $(pwd)" >&2
fi

# Check if there are still conflicts
Expand All @@ -94,17 +88,14 @@ if [ -z "$diffs" ]; then
git add .
if [ -n "$VERBOSE" ] ; then
echo "$0: about to run: git commit in $(pwd)"
echo "$0: about to run: git commit in $(pwd)" >&2
fi
git commit -m "Resolved conflicts by calling: git-mergetool.sh $all_arg --tool=merge-plumelib"
if [ -n "$VERBOSE" ] ; then
echo "$0: ran: git commit in $(pwd)"
echo "$0: ran: git commit in $(pwd)" >&2
fi
exit 0
fi
echo "$0: exiting with status 1"
echo "$0: exiting with status 1" >&2
echo "$0: diffs=$diffs"
echo "$0: Conflict after running in $(pwd):"
echo " $merge_script $clone_dir $branch1 $branch2"
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/merging

0 comments on commit 8167673

Please sign in to comment.