mirror of
https://github.com/git/git
synced 2024-09-13 21:34:42 +00:00
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>
This commit is contained in:
parent
e4a4e7f27a
commit
b6e9e73e8a
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
SUBDIRECTORY_OK=Yes
|
SUBDIRECTORY_OK=Yes
|
||||||
OPTIONS_KEEPDASHDASH=
|
OPTIONS_KEEPDASHDASH=
|
||||||
OPTIONS_STUCKLONG=
|
OPTIONS_STUCKLONG=t
|
||||||
OPTIONS_SPEC="\
|
OPTIONS_SPEC="\
|
||||||
git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] [<upstream>] [<branch>]
|
git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] [<upstream>] [<branch>]
|
||||||
git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] --root [<branch>]
|
git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] --root [<branch>]
|
||||||
|
@ -237,21 +237,19 @@ do
|
||||||
test $total_argc -eq 2 || usage
|
test $total_argc -eq 2 || usage
|
||||||
action=${1##--}
|
action=${1##--}
|
||||||
;;
|
;;
|
||||||
--onto)
|
--onto=*)
|
||||||
onto="$2"
|
onto="${1#--onto=}"
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-x)
|
--exec=*)
|
||||||
cmd="${cmd}exec $2${LF}"
|
cmd="${cmd}exec ${1#--exec=}${LF}"
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-i)
|
--interactive)
|
||||||
interactive_rebase=explicit
|
interactive_rebase=explicit
|
||||||
;;
|
;;
|
||||||
-k)
|
--keep-empty)
|
||||||
keep_empty=yes
|
keep_empty=yes
|
||||||
;;
|
;;
|
||||||
-p)
|
--preserve-merges)
|
||||||
preserve_merges=t
|
preserve_merges=t
|
||||||
test -z "$interactive_rebase" && interactive_rebase=implied
|
test -z "$interactive_rebase" && interactive_rebase=implied
|
||||||
;;
|
;;
|
||||||
|
@ -267,21 +265,19 @@ do
|
||||||
--no-fork-point)
|
--no-fork-point)
|
||||||
fork_point=
|
fork_point=
|
||||||
;;
|
;;
|
||||||
-m)
|
--merge)
|
||||||
do_merge=t
|
do_merge=t
|
||||||
;;
|
;;
|
||||||
-X)
|
--strategy-option=*)
|
||||||
shift
|
strategy_opts="$strategy_opts $(git rev-parse --sq-quote "--${1#--strategy-option=}")"
|
||||||
strategy_opts="$strategy_opts $(git rev-parse --sq-quote "--$1")"
|
|
||||||
do_merge=t
|
do_merge=t
|
||||||
test -z "$strategy" && strategy=recursive
|
test -z "$strategy" && strategy=recursive
|
||||||
;;
|
;;
|
||||||
-s)
|
--strategy=*)
|
||||||
shift
|
strategy="${1#--strategy=}"
|
||||||
strategy="$1"
|
|
||||||
do_merge=t
|
do_merge=t
|
||||||
;;
|
;;
|
||||||
-n)
|
--no-stat)
|
||||||
diffstat=
|
diffstat=
|
||||||
;;
|
;;
|
||||||
--stat)
|
--stat)
|
||||||
|
@ -290,21 +286,20 @@ do
|
||||||
--autostash)
|
--autostash)
|
||||||
autostash=true
|
autostash=true
|
||||||
;;
|
;;
|
||||||
-v)
|
--verbose)
|
||||||
verbose=t
|
verbose=t
|
||||||
diffstat=t
|
diffstat=t
|
||||||
GIT_QUIET=
|
GIT_QUIET=
|
||||||
;;
|
;;
|
||||||
-q)
|
--quiet)
|
||||||
GIT_QUIET=t
|
GIT_QUIET=t
|
||||||
git_am_opt="$git_am_opt -q"
|
git_am_opt="$git_am_opt -q"
|
||||||
verbose=
|
verbose=
|
||||||
diffstat=
|
diffstat=
|
||||||
;;
|
;;
|
||||||
--whitespace)
|
--whitespace=*)
|
||||||
shift
|
git_am_opt="$git_am_opt --whitespace=${1#--whitespace=}"
|
||||||
git_am_opt="$git_am_opt --whitespace=$1"
|
case "${1#--whitespace=}" in
|
||||||
case "$1" in
|
|
||||||
fix|strip)
|
fix|strip)
|
||||||
force_rebase=t
|
force_rebase=t
|
||||||
;;
|
;;
|
||||||
|
@ -317,14 +312,13 @@ do
|
||||||
git_am_opt="$git_am_opt $1"
|
git_am_opt="$git_am_opt $1"
|
||||||
force_rebase=t
|
force_rebase=t
|
||||||
;;
|
;;
|
||||||
-C)
|
-C*)
|
||||||
shift
|
git_am_opt="$git_am_opt $1"
|
||||||
git_am_opt="$git_am_opt -C$1"
|
|
||||||
;;
|
;;
|
||||||
--root)
|
--root)
|
||||||
rebase_root=t
|
rebase_root=t
|
||||||
;;
|
;;
|
||||||
-f|--no-ff)
|
--force-rebase|--no-ff)
|
||||||
force_rebase=t
|
force_rebase=t
|
||||||
;;
|
;;
|
||||||
--rerere-autoupdate|--no-rerere-autoupdate)
|
--rerere-autoupdate|--no-rerere-autoupdate)
|
||||||
|
|
Loading…
Reference in a new issue