git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: git@vger.kernel.org
Cc: Nicolas Vigier <boklm@mars-attacks.org>,
	Junio C Hamano <gitster@pobox.com>
Subject: [PATCH v2 7/9] rebase: parse options in stuck-long mode
Date: Fri, 24 Jan 2014 00:51:04 +0000	[thread overview]
Message-ID: <1390524666-51274-8-git-send-email-sandals@crustytoothpaste.net> (raw)
In-Reply-To: <1390524666-51274-1-git-send-email-sandals@crustytoothpaste.net>

From: Nicolas Vigier <boklm@mars-attacks.org>

There is no functionnal change. The reason for this change is to be able
to add a new option taking an optional argument.

Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
---
 git-rebase.sh | 50 ++++++++++++++++++++++----------------------------
 1 file changed, 22 insertions(+), 28 deletions(-)

diff --git a/git-rebase.sh b/git-rebase.sh
index 3b55211..842d7d4 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -5,7 +5,7 @@
 
 SUBDIRECTORY_OK=Yes
 OPTIONS_KEEPDASHDASH=
-OPTIONS_STUCKLONG=
+OPTIONS_STUCKLONG=t
 OPTIONS_SPEC="\
 git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] [<upstream>] [<branch>]
 git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] --root [<branch>]
@@ -237,21 +237,19 @@ do
 		test $total_argc -eq 2 || usage
 		action=${1##--}
 		;;
-	--onto)
-		onto="$2"
-		shift
+	--onto=*)
+		onto="${1#--onto=}"
 		;;
-	-x)
-		cmd="${cmd}exec $2${LF}"
-		shift
+	--exec=*)
+		cmd="${cmd}exec ${1#--exec=}${LF}"
 		;;
-	-i)
+	--interactive)
 		interactive_rebase=explicit
 		;;
-	-k)
+	--keep-empty)
 		keep_empty=yes
 		;;
-	-p)
+	--preserve-merges)
 		preserve_merges=t
 		test -z "$interactive_rebase" && interactive_rebase=implied
 		;;
@@ -267,21 +265,19 @@ do
 	--no-fork-point)
 		fork_point=
 		;;
-	-m)
+	--merge)
 		do_merge=t
 		;;
-	-X)
-		shift
-		strategy_opts="$strategy_opts $(git rev-parse --sq-quote "--$1")"
+	--strategy-option=*)
+		strategy_opts="$strategy_opts $(git rev-parse --sq-quote "--${1#--strategy-option=}")"
 		do_merge=t
 		test -z "$strategy" && strategy=recursive
 		;;
-	-s)
-		shift
-		strategy="$1"
+	--strategy=*)
+		strategy="${1#--strategy=}"
 		do_merge=t
 		;;
-	-n)
+	--no-stat)
 		diffstat=
 		;;
 	--stat)
@@ -290,21 +286,20 @@ do
 	--autostash)
 		autostash=true
 		;;
-	-v)
+	--verbose)
 		verbose=t
 		diffstat=t
 		GIT_QUIET=
 		;;
-	-q)
+	--quiet)
 		GIT_QUIET=t
 		git_am_opt="$git_am_opt -q"
 		verbose=
 		diffstat=
 		;;
-	--whitespace)
-		shift
-		git_am_opt="$git_am_opt --whitespace=$1"
-		case "$1" in
+	--whitespace=*)
+		git_am_opt="$git_am_opt --whitespace=${1#--whitespace=}"
+		case "${1#--whitespace=}" in
 		fix|strip)
 			force_rebase=t
 			;;
@@ -317,14 +312,13 @@ do
 		git_am_opt="$git_am_opt $1"
 		force_rebase=t
 		;;
-	-C)
-		shift
-		git_am_opt="$git_am_opt -C$1"
+	-C*)
+		git_am_opt="$git_am_opt $1"
 		;;
 	--root)
 		rebase_root=t
 		;;
-	-f|--no-ff)
+	--force-rebase|--no-ff)
 		force_rebase=t
 		;;
 	--rerere-autoupdate|--no-rerere-autoupdate)
-- 
1.9.rc0.1002.gd081c64.dirty

  parent reply	other threads:[~2014-01-24  0:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-24  0:50 [PATCH v2 0/9] add --gpg-sign to rebase and pull brian m. carlson
2014-01-24  0:50 ` [PATCH v2 1/9] cherry-pick, revert: add the --gpg-sign option brian m. carlson
2014-01-24 21:00   ` Junio C Hamano
2014-01-24 21:08     ` brian m. carlson
2014-01-24 22:45       ` Junio C Hamano
2014-01-24  0:50 ` [PATCH v2 2/9] git-sh-setup.sh: add variable to use the stuck-long mode brian m. carlson
2014-01-27 23:21   ` Junio C Hamano
2014-01-24  0:51 ` [PATCH v2 3/9] am: parse options in " brian m. carlson
2014-01-24  0:51 ` [PATCH v2 4/9] am: add the --gpg-sign option brian m. carlson
2014-01-27 23:26   ` Junio C Hamano
2014-01-24  0:51 ` [PATCH v2 5/9] rebase: remove useless arguments check brian m. carlson
2014-01-24  0:51 ` [PATCH v2 6/9] rebase: don't try to match -M option brian m. carlson
2014-01-24  0:51 ` brian m. carlson [this message]
2014-01-24  0:51 ` [PATCH v2 8/9] rebase: add the --gpg-sign option brian m. carlson
2014-01-27 23:36   ` Junio C Hamano
2014-01-27 23:59     ` brian m. carlson
2014-01-24  0:51 ` [PATCH v2 9/9] pull: " brian m. carlson
2014-01-27 23:31   ` Junio C Hamano
2014-02-01  1:01     ` brian m. carlson
2014-02-03 18:04       ` Junio C Hamano
2014-01-24  9:14 ` [PATCH v2 0/9] add --gpg-sign to rebase and pull Nicolas Vigier
2014-01-24 20:06   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1390524666-51274-8-git-send-email-sandals@crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=boklm@mars-attacks.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).