summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--commit.sh16
1 files changed, 15 insertions, 1 deletions
diff --git a/commit.sh b/commit.sh
index f06124c..b85ddff 100644
--- a/commit.sh
+++ b/commit.sh
@@ -48,11 +48,25 @@ function systr_record_commit_mesg
function systr_commit
{
if [ $# -ne 0 ]; then
- branch=$1
+ branch="$1"
else
branch="$TRAC"
fi
+ if [[ "$branch" == "BASE" ]]; then
+ echo "Fatal: bad branch name"
+ exit 1
+ elif [[ "$branch" == "TRAC" ]]; then
+ echo "Fatal: bad branch name"
+ exit 1
+ elif [[ "$branch" == "NULL" ]]; then
+ echo "Fatal: bad branch name"
+ exit 1
+ elif [[ "$branch" == "MERG" ]]; then
+ echo "Fatal: bad branch name"
+ exit 1
+ fi
+
branchcommit=$(systr_repo_resolve_reference "$branch") || branchcommit="$BASE"
if [[ "$BASE" != "$branchcommit" ]]; then