From: Nicolas Vigier <boklm@mars-attacks.org>
To: git@vger.kernel.org
Cc: Nicolas Vigier <boklm@mars-attacks.org>
Subject: [PATCH 7/8] rebase: parse options in stuck-long mode
Date: Sun, 3 Nov 2013 16:54:23 +0100 [thread overview]
Message-ID: <1383494064-5653-8-git-send-email-boklm@mars-attacks.org> (raw)
In-Reply-To: <1383494064-5653-1-git-send-email-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>
---
git-rebase.sh | 50 ++++++++++++++++++++++----------------------------
1 file changed, 22 insertions(+), 28 deletions(-)
diff --git a/git-rebase.sh b/git-rebase.sh
index 2f2f8ded5c3f..a6c294b2289b 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>]
@@ -235,21 +235,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
;;
@@ -259,21 +257,19 @@ do
--no-autosquash)
autosquash=
;;
- -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)
@@ -282,21 +278,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
;;
@@ -309,14 +304,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.8.4.2
next prev parent reply other threads:[~2013-11-03 15:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-03 15:54 Adding --gpg-sign to cherry-pick, revert, am, rebase Nicolas Vigier
2013-11-03 15:54 ` [PATCH 1/8] cherry-pick, revert: add the --gpg-sign option Nicolas Vigier
2013-11-03 17:50 ` brian m. carlson
2013-11-03 18:00 ` Nicolas Vigier
2013-11-03 18:46 ` [PATCH] " Nicolas Vigier
2013-11-03 18:48 ` brian m. carlson
2013-11-03 15:54 ` [PATCH 2/8] git-sh-setup.sh: add variable to use the stuck-long mode Nicolas Vigier
2013-11-03 15:54 ` [PATCH 3/8] am: parse options in " Nicolas Vigier
2013-11-03 15:54 ` [PATCH 4/8] am: add the --gpg-sign option Nicolas Vigier
2013-11-03 19:30 ` [PATCH] " Nicolas Vigier
2013-11-03 15:54 ` [PATCH 5/8] rebase: remove useless arguments check Nicolas Vigier
2013-11-03 15:54 ` [PATCH 6/8] rebase: don't try to match -M option Nicolas Vigier
2013-11-03 15:54 ` Nicolas Vigier [this message]
2013-11-03 15:54 ` [PATCH 8/8] rebase: add the --gpg-sign option Nicolas Vigier
2013-12-08 20:40 ` Adding --gpg-sign to cherry-pick, revert, am, rebase brian m. carlson
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=1383494064-5653-8-git-send-email-boklm@mars-attacks.org \
--to=boklm@mars-attacks.org \
--cc=git@vger.kernel.org \
/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).