summaryrefslogtreecommitdiff
path: root/git-rebase--interactive.sh
diff options
context:
space:
mode:
authorLibravatar Alban Gruin <alban.gruin@gmail.com>2018-08-28 14:10:40 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-08-29 13:38:18 -0700
commit65850686cf072d6de88880247adb7113db8a52f2 (patch)
tree5fbea0be6ec16fe712d62503ed6a885b804bc9c8 /git-rebase--interactive.sh
parentrebase -i: rewrite the rest of init_revisions_and_shortrevisions() in C (diff)
downloadtgif-65850686cf072d6de88880247adb7113db8a52f2.tar.xz
rebase -i: rewrite write_basic_state() in C
This rewrites write_basic_state() from git-rebase.sh in C. This is the first step in the conversion of init_basic_state(), hence the mode in rebase--helper.c is called INIT_BASIC_STATE. init_basic_state() will be converted in the next commit. The part of read_strategy_opts() that parses the stategy options is moved to a new function to allow its use in rebase--helper.c. Finally, the call to write_basic_state() is removed from git-rebase--interactive.sh, replaced by a call to `--init-basic-state`. 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.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 08e9a21c2f..6367da66e2 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -57,7 +57,6 @@ init_basic_state () {
rm -f "$(git rev-parse --git-path REBASE_HEAD)"
: > "$state_dir"/interactive || die "$(gettext "Could not mark as interactive")"
- write_basic_state
}
git_rebase__interactive () {
@@ -70,6 +69,12 @@ git_rebase__interactive () {
git rebase--helper --prepare-branch "$switch_to" ${verbose:+--verbose}
init_basic_state
+ 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} \