Skip to content

Commit

Permalink
Check number of arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
mernst authored Sep 2, 2024
1 parent 2e0c9f4 commit 454846a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/scripts/merge_tools/git_hires_merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

# usage: ./git_hires_merge.sh <clone_dir> <branch-1> <branch-2>

set -o nounset

if [ "$#" -ne 3 ]; then
echo "Usage: $0 CLONE_DIR BRANCH1 BRANCH2" >&2
exit 1
fi

clone_dir=$1
branch1=$2
branch2=$3
Expand Down
11 changes: 11 additions & 0 deletions src/scripts/merge_tools/merge_git_then_plumelib.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
#!/usr/bin/env sh

# usage: ./merge_git_then_plumelib.sh <clone_dir> <branch-1> <branch-2> <git_strategy> <plumelib_strategy>
# First runs `git merge`, then runs Plume-lib Merging to improve the result of `git merge`.
# <clone_dir> must contain a clone of a repository.
# 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.

set -o nounset

if [ "$#" -ne 5 ]; then
echo "Usage: $0 CLONE_DIR BRANCH1 BRANCH2 GIT_STRATEGY PLUMELIB_STRATEGY" >&2
exit 2
fi

clone_dir=$1
branch1=$2
Expand Down

0 comments on commit 454846a

Please sign in to comment.