Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Do not quote variable assignments.

  • Loading branch information...
commit c5fcc01adb546973dd4ca703684bbd59e76304d3 1 parent fafa2b2
@nvie authored
View
10 git-flow-feature
@@ -35,7 +35,7 @@ cmd_list() {
typeset feature_branches
typeset current_branch
typeset short_names
- feature_branches="$(echo "$LOCAL_BRANCHES" | grep "^$PREFIX")"
+ feature_branches=$(echo "$LOCAL_BRANCHES" | grep "^$PREFIX")
if [ -z "$feature_branches" ]; then
warn "No feature branches exist."
exit 0
@@ -54,7 +54,7 @@ cmd_list() {
typeset branch
for branch in $short_names; do
- typeset fullname="$PREFIX$branch"
+ typeset fullname=$PREFIX$branch
typeset base=$(git merge-base "$fullname" "$DEVELOP_BRANCH")
typeset develop_sha=$(git rev-parse "$DEVELOP_BRANCH")
typeset branch_sha=$(git rev-parse "$fullname")
@@ -133,7 +133,7 @@ parse_args() {
eval set -- "${FLAGS_ARGV}"
# read arguments into global variables
- NAME="$1"
+ NAME=$1
BRANCH=$PREFIX$NAME
}
@@ -141,7 +141,7 @@ cmd_start() {
DEFINE_boolean fetch false 'fetch from origin before performing local operation' F
DEFINE_boolean force false 'force creation of feature branch (ignores dirty working tree)' f
parse_args "$@"
- BASE="${2:-$DEVELOP_BRANCH}"
+ BASE=${2:-$DEVELOP_BRANCH}
require_name_arg
# sanity checks
@@ -195,7 +195,7 @@ cmd_finish() {
# exit code for "unmerged changes in working tree", which we should
# actually be testing for here
if gitflow_test_clean_working_tree; then
- FINISH_BASE="$(cat "$GIT_DIR/.gitflow/MERGE_BASE")"
+ FINISH_BASE=$(cat "$GIT_DIR/.gitflow/MERGE_BASE")
# Since the working tree is now clean, either the user did a
# succesfull merge manually, or the merge was cancelled.
View
12 git-flow-hotfix
@@ -32,7 +32,7 @@ cmd_list() {
typeset hotfix_branches
typeset current_branch
typeset short_names
- hotfix_branches="$(echo "$LOCAL_BRANCHES" | grep "^$PREFIX")"
+ hotfix_branches=$(echo "$LOCAL_BRANCHES" | grep "^$PREFIX")
if [ -z "$hotfix_branches" ]; then
warn "No hotfix branches exist."
exit 0
@@ -51,7 +51,7 @@ cmd_list() {
typeset branch
for branch in $short_names; do
- typeset fullname="$PREFIX$branch"
+ typeset fullname=$PREFIX$branch
typeset base=$(git merge-base "$fullname" "$MASTER_BRANCH")
typeset master_sha=$(git rev-parse "$MASTER_BRANCH")
typeset branch_sha=$(git rev-parse "$fullname")
@@ -68,9 +68,9 @@ cmd_list() {
typeset tagname=$(git name-rev --tags --no-undefined --name-only $base)
typeset nicename
if [ "$tagname" != "" ]; then
- nicename="$tagname"
+ nicename=$tagname
else
- nicename="$(git rev-parse --short $base)"
+ nicename=$(git rev-parse --short $base)
fi
printf "(based on $nicename)"
fi
@@ -92,7 +92,7 @@ parse_args() {
eval set -- "${FLAGS_ARGV}"
# read arguments into global variables
- VERSION="$1"
+ VERSION=$1
BRANCH=$PREFIX$VERSION
}
@@ -115,7 +115,7 @@ require_base_is_on_master() {
cmd_start() {
DEFINE_boolean fetch true "fetch from $ORIGIN before performing finish" F
parse_args "$@"
- BASE="${2:-$MASTER_BRANCH}"
+ BASE=${2:-$MASTER_BRANCH}
require_version_arg
require_base_is_on_master
View
12 git-flow-release
@@ -43,7 +43,7 @@ cmd_list() {
typeset release_branches
typeset current_branch
typeset short_names
- release_branches="$(echo "$LOCAL_BRANCHES" | grep "^$PREFIX")"
+ release_branches=$(echo "$LOCAL_BRANCHES" | grep "^$PREFIX")
if [ -z "$release_branches" ]; then
warn "No release branches exist."
exit 0
@@ -63,7 +63,7 @@ cmd_list() {
typeset branch
for branch in $short_names; do
- typeset fullname="$PREFIX$branch"
+ typeset fullname=$PREFIX$branch
typeset base=$(git merge-base "$fullname" "$DEVELOP_BRANCH")
typeset develop_sha=$(git rev-parse "$DEVELOP_BRANCH")
typeset branch_sha=$(git rev-parse "$fullname")
@@ -77,7 +77,7 @@ cmd_list() {
if [ "$branch_sha" = "$develop_sha" ]; then
printf "(no commits yet)"
else
- typeset nicename="$(git rev-parse --short $base)"
+ typeset nicename=$(git rev-parse --short $base)
printf "(based on $nicename)"
fi
else
@@ -98,8 +98,8 @@ parse_args() {
eval set -- "${FLAGS_ARGV}"
# read arguments into global variables
- VERSION="$1"
- BRANCH="$PREFIX$VERSION"
+ VERSION=$1
+ BRANCH=$PREFIX$VERSION
}
require_version_arg() {
@@ -121,7 +121,7 @@ require_base_is_on_develop() {
cmd_start() {
DEFINE_boolean fetch true "fetch from $ORIGIN before performing finish" F
parse_args "$@"
- BASE="${2:-$DEVELOP_BRANCH}"
+ BASE=${2:-$DEVELOP_BRANCH}
require_version_arg
require_base_is_on_develop
View
12 git-flow-support
@@ -34,7 +34,7 @@ cmd_list() {
typeset support_branches
typeset current_branch
typeset short_names
- support_branches="$(echo "$LOCAL_BRANCHES" | grep "^$PREFIX")"
+ support_branches=$(echo "$LOCAL_BRANCHES" | grep "^$PREFIX")
if [ -z "$support_branches" ]; then
warn "No support branches exist."
exit 0
@@ -53,7 +53,7 @@ cmd_list() {
typeset branch
for branch in $short_names; do
- typeset fullname="$PREFIX$branch"
+ typeset fullname=$PREFIX$branch
typeset base=$(git merge-base "$fullname" "$MASTER_BRANCH")
typeset master_sha=$(git rev-parse "$MASTER_BRANCH")
typeset branch_sha=$(git rev-parse "$fullname")
@@ -70,9 +70,9 @@ cmd_list() {
typeset tagname=$(git name-rev --tags --no-undefined --name-only $base)
typeset nicename
if [ "$tagname" != "" ]; then
- nicename="$tagname"
+ nicename=$tagname
else
- nicename="$(git rev-parse --short $base)"
+ nicename=$(git rev-parse --short $base)
fi
printf "(based on $nicename)"
fi
@@ -94,8 +94,8 @@ parse_args() {
eval set -- "${FLAGS_ARGV}"
# read arguments into global variables
- VERSION="$1"
- BASE="$2"
+ VERSION=$1
+ BASE=$2
BRANCH=$PREFIX$VERSION
}
View
6 gitflow-common
@@ -61,8 +61,8 @@ ALL_TAGS=$(git tag)
# 2: Multiple matches found. These matches are written to stderr
#
resolve_nameprefix() {
- typeset name="$1"
- typeset prefix="$2"
+ typeset name=$1
+ typeset prefix=$2
typeset matches
typeset -i num_matches
@@ -72,7 +72,7 @@ resolve_nameprefix() {
return 0
fi
- matches="$(echo "$LOCAL_BRANCHES" | grep "^$prefix$name")"
+ matches=$(echo "$LOCAL_BRANCHES" | grep "^$prefix$name")
num_matches=$(echo "$matches" | wc -l)
if [ -z "$matches" ]; then
# no prefix match, so take it literally
Please sign in to comment.
Something went wrong with that request. Please try again.