diff --git a/bin/git-feature b/bin/git-feature
index 7b1e726a1..207f25f03 100755
--- a/bin/git-feature
+++ b/bin/git-feature
@@ -6,22 +6,30 @@ if [ -z "$branch_prefix" ]; then
branch_prefix="feature"
fi
+branch_separator=$(git config --get git-extras.feature.separator)
+
+if [ -z "$branch_separator" ]; then
+ branch_separator="/"
+fi
+
merge_mode="--no-ff"
+finish=false
declare -a argv
while test $# != 0
do
case $1 in
-a|--alias )
- if [[ -n $2 ]]
+ if [[ -n $2 ]] && [[ $2 != -- ]]
then
shift # shift -a|-alias
branch_prefix=$1
else
- argv+=("$1") # treat tail '-a' as Create/Merge the given feature branch Create/Merge the given feature branch. The branch <-a|--alias branch_prefix> <-a|--alias branch_prefix> The branch prefix to use, or <-s|--separator branch_separator> The separator to use for joining the branch prefix and the branch name, or <-r|--remote [remote_name]> use Setup a remote tracking branch using <-r|--remote [remote_name]> <--from [start_point]> Setup a remote tracking branch using Setup a start point when the branch created. If <--from [start_point]> <finish> Setup a start point when the branch created. If Merge and delete the feature branch. <finish> <--squash> Merge and delete the feature branch. Run a squash merge. <--squash> <name> Run a squash merge. The name of the feature branch. <name> The name of the feature branch. You can configure the default branch prefix and separator via git config options. $ git config --global add git-extras.feature.prefix "branch_prefix" The default $ git config --global add git-extras.feature.separator "-" The default NAME
SYNOPSIS
-git-feature [-a|--alias branch_prefix] [-r|--remote [remote_name]] <name>
-git-feature [-a|--alias branch_prefix] finish [--squash] <name>git-feature [-a|--alias branch_prefix] [-s|--separator branch_separator] [-r|--remote [remote_name]] <name>
+git-feature [-a|--alias branch_prefix] [-s|--separator branch_separator] finish [--squash] <name>DESCRIPTION
-name may be specified as multiple words which will be joined with - characters. If any word should start with a -, the name should be preceded by --, which will signal that option parsing should be ignored.OPTIONS
-feature if not supplied./ if not supplied.branch_prefix instead of featureremote_name. If remote_name is not supplied, use origin by default.remote_name. If remote_name is not supplied, use origin by default.--from is not supplied, use the current branch by default.--from is not supplied, use the current branch by default.GIT CONFIG
-branch_prefix is feature.branch_separator is /.EXAMPLES
@@ -135,14 +154,34 @@ EXAMPLES
$ (features/dependencies) ...
$ (features/dependencies) git checkout master
$ git features finish dependencies
$ git feature -s - dependencies
+$ (feature-dependencies) ...
+$ (feature-dependencies) git checkout master
+$ git feature -s - finish dependencies
$ git config --global --add git-extras.feature.prefix "features"
+$ git config --global --add git-extras.feature.separator "."
+$ git feature dependency tracking
+$ (features.dependency-tracking) ...
+$ (features.dependency-tracking) git checkout master
+$ git feature finish dependency tracking
git-feature option flag as part of a branch name:$ git feature -- --remote
+...
+$ (feature/--remote) git commit -m "Some changes"
Written by Jesús Espino <jespinog@gmail.com>
-Modified by Mark Pitman <mark.pitman@gmail.com>
-Modified by Carlos Prado <carlos.prado@cpradog.com>
Written by Jesús Espino <jespinog@gmail.com>
+Modified by Mark Pitman <mark.pitman@gmail.com>
+Modified by Carlos Prado <carlos.prado@cpradog.com>
+Modified by Austin Ziegler <halostatue@gmail.com>