mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 15:36:21 -04:00
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:
commit
b200552c90
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue