From: brian m. carlson Date: Sat, 01 Feb 2014 02:18:00 GMT Subject: [PATCH v3 3/9] am: parse options in stuck-long mode Message-ID: <1391221086-1044384-4-git-send-email-sandals@crustytoothpaste.net> In-Reply-To: <1391221086-1044384-1-git-send-email-sandals@crustytoothpaste.net> From: Nicolas Vigier There is no functional change. The reason for this change is to be able to add a new option taking an optional argument. Signed-off-by: Nicolas Vigier Signed-off-by: brian m. carlson --- git-am.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/git-am.sh b/git-am.sh index a3b6f98..020abf6 100755 --- a/git-am.sh +++ b/git-am.sh @@ -4,7 +4,7 @@ SUBDIRECTORY_OK=Yes OPTIONS_KEEPDASHDASH= -OPTIONS_STUCKLONG= +OPTIONS_STUCKLONG=t OPTIONS_SPEC="\ git am [options] [(|)...] git am [options] (--continue | --skip | --abort) @@ -414,14 +414,14 @@ it will be removed. Please do not use it anymore." abort=t ;; --rebasing) rebasing=t threeway=t ;; - --resolvemsg) - shift; resolvemsg=$1 ;; - --whitespace|--directory|--exclude|--include) - git_apply_opt="$git_apply_opt $(sq "$1=$2")"; shift ;; - -C|-p) - git_apply_opt="$git_apply_opt $(sq "$1$2")"; shift ;; - --patch-format) - shift ; patch_format="$1" ;; + --resolvemsg=*) + resolvemsg="${1#--resolvemsg=}" ;; + --whitespace=*|--directory=*|--exclude=*|--include=*) + git_apply_opt="$git_apply_opt $(sq "$1")" ;; + -C*|-p*) + git_apply_opt="$git_apply_opt $(sq "$1")" ;; + --patch-format=*) + patch_format="${1#--patch-format=}" ;; --reject|--ignore-whitespace|--ignore-space-change) git_apply_opt="$git_apply_opt $1" ;; --committer-date-is-author-date) -- 1.9.rc1.1006.g13f506b.dirty