Merge pull request #181 from zeroDivisible/feature/handle-misspellings

git bug|feature|refactor accepts a single argument if not finishing.
This commit is contained in:
hemanth.hm 2014-07-09 11:13:02 +05:30
commit b200552c90
3 changed files with 10 additions and 1 deletions

View file

@ -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 <name> required." && exit 1
test -z $1 && echo "bug <name> required." 1>&2 && exit 1
if test -n $2; then
echo "too many arguments; if not finishing a bug, only <name> of new bug is expected" && exit 1
fi
branch=bug/$1
git checkout -b $branch &> /dev/null
fi

View file

@ -6,6 +6,9 @@ if test "$1" = "finish"; then
git merge --no-ff $branch && git delete-branch $branch
else
test -z $1 && echo "feature <name> required." 1>&2 && exit 1
if test -n $2; then
echo "too many arguments; if not finishing a feature, only <name> of new feature is expected" && exit 1
fi
branch=feature/$1
git checkout -b $branch &> /dev/null
fi

View file

@ -6,6 +6,9 @@ if test "$1" = "finish"; then
git merge --no-ff $branch && git delete-branch $branch
else
test -z $1 && echo "refactor <name> required." 1>&2 && exit 1
if test -n $2; then
echo "too many arguments; if not finishing a refactor, only <name> of new refactoring is expected" && exit 1
fi
branch=refactor/$1
git checkout -b $branch &> /dev/null
fi