From 3d8db9dbb922c1e75c306a4e24567d84e3514ee2 Mon Sep 17 00:00:00 2001 From: Sasha Khamkov Date: Thu, 24 Jul 2014 10:28:51 +0300 Subject: [PATCH] Fix feature|refactor|bug testing argument for string lenght https://github.com/visionmedia/git-extras/commit/93d92ae3383b637d8b9ffd028bfdd15ae21d0591#diff-dde525a12e9f5e19 Seems only works while $2 is quoted, e.g. "$2" Closes #241 --- bin/git-bug | 2 +- bin/git-feature | 2 +- bin/git-refactor | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/git-bug b/bin/git-bug index e6c263f..3738654 100755 --- a/bin/git-bug +++ b/bin/git-bug @@ -6,7 +6,7 @@ if test "$1" = "finish"; then git merge --no-ff $branch && git delete-branch $branch else test -z $1 && echo "bug required." 1>&2 && exit 1 - if test -n $2; then + 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 diff --git a/bin/git-feature b/bin/git-feature index b2a9129..4a1eed0 100755 --- a/bin/git-feature +++ b/bin/git-feature @@ -6,7 +6,7 @@ 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 + 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 diff --git a/bin/git-refactor b/bin/git-refactor index caffb7f..1130956 100755 --- a/bin/git-refactor +++ b/bin/git-refactor @@ -7,7 +7,7 @@ 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 + 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