diff --git a/bin/git-bug b/bin/git-bug index 4ce5437..e6c263f 100755 --- a/bin/git-bug +++ b/bin/git-bug @@ -5,7 +5,10 @@ if test "$1" = "finish"; then branch=bug/$2 git merge --no-ff $branch && git delete-branch $branch else - test -z $1 && echo "bug required." && exit 1 + test -z $1 && echo "bug required." 1>&2 && exit 1 + if test -n $2; then + echo "too many arguments; if not finishing a bug, only of new bug is expected" && exit 1 + fi branch=bug/$1 git checkout -b $branch &> /dev/null fi diff --git a/bin/git-feature b/bin/git-feature index 29aacd0..b2a9129 100755 --- a/bin/git-feature +++ b/bin/git-feature @@ -6,6 +6,9 @@ if test "$1" = "finish"; then git merge --no-ff $branch && git delete-branch $branch else test -z $1 && echo "feature required." 1>&2 && exit 1 + if test -n $2; then + echo "too many arguments; if not finishing a feature, only of new feature is expected" && exit 1 + fi branch=feature/$1 git checkout -b $branch &> /dev/null fi diff --git a/bin/git-refactor b/bin/git-refactor index e87143a..5898c43 100755 --- a/bin/git-refactor +++ b/bin/git-refactor @@ -6,6 +6,9 @@ if test "$1" = "finish"; then git merge --no-ff $branch && git delete-branch $branch else test -z $1 && echo "refactor required." 1>&2 && exit 1 + if test -n $2; then + echo "too many arguments; if not finishing a refactor, only of new refactoring is expected" && exit 1 + fi branch=refactor/$1 git checkout -b $branch &> /dev/null fi