diff options
author | Malf Furious <m@lfurio.us> | 2017-08-29 02:22:03 -0400 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2017-08-29 02:22:03 -0400 |
commit | 2ceeb1baef56a1aa49db4d43fb3160d8a2832f39 (patch) | |
tree | 585e94b703063996662459d157481696e5169fdd /commit.sh | |
parent | 25edaf328f7ce772ea7c7e923a1e2214b615b7d9 (diff) | |
download | systrunk-2ceeb1baef56a1aa49db4d43fb3160d8a2832f39.tar.gz systrunk-2ceeb1baef56a1aa49db4d43fb3160d8a2832f39.zip |
Update commit op
Disallow commits to any reserved names except for HEAD
Diffstat (limited to 'commit.sh')
-rw-r--r-- | commit.sh | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -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 |