aboutsummaryrefslogtreecommitdiff
path: root/git-rebase.sh
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mars-attacks.org>2014-02-10 01:03:36 +0000
committerJunio C Hamano <gitster@pobox.com>2014-02-11 14:48:05 -0800
commitb6e9e73e8af20c2301595d58087ad58a9df05725 (patch)
tree3bc11ac917430accb6eb6a640927b86d036efbf8 /git-rebase.sh
parente4a4e7f27ad5d7a8534608b9a4d2d19ee6238925 (diff)
downloadgit-b6e9e73e8af20c2301595d58087ad58a9df05725.tar.gz
git-b6e9e73e8af20c2301595d58087ad58a9df05725.tar.xz
rebase: parse options in stuck-long mode
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 <boklm@mars-attacks.org> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-xgit-rebase.sh50
1 files changed, 22 insertions, 28 deletions
diff --git a/git-rebase.sh b/git-rebase.sh
index 3b5521108..842d7d494 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)