Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlban Gruin <alban.gruin@gmail.com>2018-09-28 00:56:07 +0300
committerJunio C Hamano <gitster@pobox.com>2018-10-09 04:44:10 +0300
commit53bbcfbde7c29611f16722c3fbcdb2b78718f633 (patch)
tree4a2761ec2411f5e88e3c024f928566499171e7b2 /git-rebase--interactive.sh
parentd59cd14de8e05111f45ad55a507493225cd849bc (diff)
rebase -i: implement the main part of interactive rebase as a builtin
This rewrites the part of interactive rebase which initializes the basic state, make the script and complete the action, as a buitin, named git-rebase--interactive2 for now. Others modes (`--continue`, `--edit-todo`, etc.) will be rewritten in the next commit. git-rebase--interactive.sh is modified to call git-rebase--interactive2 instead of git-rebase--helper. Signed-off-by: Alban Gruin <alban.gruin@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--interactive.sh')
-rw-r--r--git-rebase--interactive.sh41
1 files changed, 22 insertions, 19 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 761be95ed1..e87d708a4d 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -58,24 +58,27 @@ git_rebase__interactive () {
return 0
fi
- git rebase--helper --prepare-branch "$switch_to" ${verbose:+--verbose}
+ test -n "$keep_empty" && keep_empty="--keep-empty"
+ test -n "$rebase_merges" && rebase_merges="--rebase-merges"
+ test -n "$rebase_cousins" && rebase_cousins="--rebase-cousins"
+ test -n "$autosquash" && autosquash="--autosquash"
+ test -n "$verbose" && verbose="--verbose"
+ test -n "$force_rebase" && force_rebase="--no-ff"
+ test -n "$restrict_revisions" && restrict_revisions="--restrict-revisions=^$restrict_revisions"
+ test -n "$upstream" && upstream="--upstream=$upstream"
+ test -n "$onto" && onto="--onto=$onto"
+ test -n "$squash_onto" && squash_onto="--squash-onto=$squash_onto"
+ test -n "$onto_name" && onto_name="--onto-name=$onto_name"
+ test -n "$head_name" && head_name="--head-name=$head_name"
+ test -n "$strategy" && strategy="--strategy=$strategy"
+ test -n "$strategy_opts" && strategy_opts="--strategy-opts=$strategy_opts"
+ test -n "$switch_to" && switch_to="--switch-to=$switch_to"
+ test -n "$cmd" && cmd="--cmd=$cmd"
- git rebase--helper --init-basic-state ${upstream:+--upstream "$upstream"} \
- ${onto:+--onto "$onto"} ${head_name:+--head-name "$head_name"} \
- ${verbose:+--verbose} ${strategy:+--strategy "$strategy"} \
- ${strategy_opts:+--strategy-opts="$strategy_opts"} \
- "$allow_rerere_autoupdate" "$gpg_sign_opt" "$signoff" || exit
-
- git rebase--helper --make-script ${keep_empty:+--keep-empty} \
- ${rebase_merges:+--rebase-merges} \
- ${rebase_cousins:+--rebase-cousins} \
- ${upstream:+--upstream "$upstream"} ${onto:+--onto "$onto"} \
- ${squash_onto:+--squash-onto "$squash_onto"} \
- ${restrict_revision:+--restrict-revision ^"$restrict_revision"} >"$todo" ||
- die "$(gettext "Could not generate todo list")"
-
- exec git rebase--helper --complete-action "$onto_name" "$cmd" \
- $allow_empty_message ${autosquash:+--autosquash} ${verbose:+--verbose} \
- ${keep_empty:+--keep-empty} ${force_rebase:+--no-ff} \
- ${upstream:+--upstream "$upstream"} ${onto:+--onto "$onto"}
+ exec git rebase--interactive2 "$keep_empty" "$rebase_merges" "$rebase_cousins" \
+ "$upstream" "$onto" "$squash_onto" "$restrict_revision" \
+ "$allow_empty_message" "$autosquash" "$verbose" \
+ "$force_rebase" "$onto_name" "$head_name" "$strategy" \
+ "$strategy_opts" "$cmd" "$switch_to" \
+ "$allow_rerere_autoupdate" "$gpg_sign_opt" "$signoff"
}