rebase -i: remove git-rebase--interactive.sh

This removes git-rebase--interactive.sh, as its functionnality has been replaced by git-rebase--interactive2. git-rebase--interactive2.c is then renamed to git-rebase--interactive.c. Signed-off-by: Alban Gruin <alban.gruin@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Alban Gruin committed Sep 27, 2018 at 23:56 UTC cf808208ec09727d993d670619c517bdcb00ca2b
6 files changed +3 -90
.gitignore
-1
@@ -118,7 +118,6 @@
118 /git-rebase--am
119 /git-rebase--helper
120 /git-rebase--interactive
121 -/git-rebase--interactive2
121 /git-rebase--merge
122 /git-rebase--preserve-merges
123 /git-receive-pack
Makefile
+1 -3
@@ -619,7 +619,6 @@ SCRIPT_SH += git-web--browse.sh
619 SCRIPT_LIB += git-mergetool--lib
620 SCRIPT_LIB += git-parse-remote
621 SCRIPT_LIB += git-rebase--am
622 -SCRIPT_LIB += git-rebase--interactive
622 SCRIPT_LIB += git-rebase--preserve-merges
623 SCRIPT_LIB += git-rebase--merge
624 SCRIPT_LIB += git-sh-setup
@@ -1060,8 +1059,8 @@ BUILTIN_OBJS += builtin/prune.o
1059 BUILTIN_OBJS += builtin/pull.o
1060 BUILTIN_OBJS += builtin/push.o
1061 BUILTIN_OBJS += builtin/read-tree.o
1063 -BUILTIN_OBJS += builtin/rebase--interactive2.o
1062 BUILTIN_OBJS += builtin/rebase--helper.o
1063 +BUILTIN_OBJS += builtin/rebase--interactive.o
1064 BUILTIN_OBJS += builtin/receive-pack.o
1065 BUILTIN_OBJS += builtin/reflog.o
1066 BUILTIN_OBJS += builtin/remote.o
@@ -2400,7 +2399,6 @@ XGETTEXT_FLAGS_PERL = $(XGETTEXT_FLAGS) --language=Perl \
2399 LOCALIZED_C = $(C_OBJ:o=c) $(LIB_H) $(GENERATED_H)
2400 LOCALIZED_SH = $(SCRIPT_SH)
2401 LOCALIZED_SH += git-parse-remote.sh
2403 -LOCALIZED_SH += git-rebase--interactive.sh
2402 LOCALIZED_SH += git-rebase--preserve-merges.sh
2403 LOCALIZED_SH += git-sh-setup.sh
2404 LOCALIZED_PERL = $(SCRIPT_PERL)
builtin/rebase--interactive.c renamed
git-rebase--interactive.sh deleted
-84
@@ -1,84 +0,0 @@
1 -# This shell script fragment is sourced by git-rebase to implement
2 -# its interactive mode. "git rebase --interactive" makes it easy
3 -# to fix up commits in the middle of a series and rearrange commits.
4 -#
5 -# Copyright (c) 2006 Johannes E. Schindelin
6 -#
7 -# The original idea comes from Eric W. Biederman, in
8 -# https://public-inbox.org/git/m1odwkyuf5.fsf_-_@ebiederm.dsl.xmission.com/
9 -#
10 -# The file containing rebase commands, comments, and empty lines.
11 -# This file is created by "git rebase -i" then edited by the user. As
12 -# the lines are processed, they are removed from the front of this
13 -# file and written to the tail of $done.
14 -todo="$state_dir"/git-rebase-todo
15 -
16 -GIT_CHERRY_PICK_HELP="$resolvemsg"
17 -export GIT_CHERRY_PICK_HELP
18 -
19 -# Initiate an action. If the cannot be any
20 -# further action it may exec a command
21 -# or exit and not return.
22 -#
23 -# TODO: Consider a cleaner return model so it
24 -# never exits and always return 0 if process
25 -# is complete.
26 -#
27 -# Parameter 1 is the action to initiate.
28 -#
29 -# Returns 0 if the action was able to complete
30 -# and if 1 if further processing is required.
31 -initiate_action () {
32 - case "$1" in
33 - continue)
34 - exec git rebase--helper ${force_rebase:+--no-ff} $allow_empty_message \
35 - --continue
36 - ;;
37 - skip)
38 - git rerere clear
39 - exec git rebase--helper ${force_rebase:+--no-ff} $allow_empty_message \
40 - --continue
41 - ;;
42 - edit-todo)
43 - exec git rebase--helper --edit-todo
44 - ;;
45 - show-current-patch)
46 - exec git show REBASE_HEAD --
47 - ;;
48 - *)
49 - return 1 # continue
50 - ;;
51 - esac
52 -}
53 -
54 -git_rebase__interactive () {
55 - initiate_action "$action"
56 - ret=$?
57 - if test $ret = 0; then
58 - return 0
59 - fi
60 -
61 - test -n "$keep_empty" && keep_empty="--keep-empty"
62 - test -n "$rebase_merges" && rebase_merges="--rebase-merges"
63 - test -n "$rebase_cousins" && rebase_cousins="--rebase-cousins"
64 - test -n "$autosquash" && autosquash="--autosquash"
65 - test -n "$verbose" && verbose="--verbose"
66 - test -n "$force_rebase" && force_rebase="--no-ff"
67 - test -n "$restrict_revisions" && restrict_revisions="--restrict-revisions=^$restrict_revisions"
68 - test -n "$upstream" && upstream="--upstream=$upstream"
69 - test -n "$onto" && onto="--onto=$onto"
70 - test -n "$squash_onto" && squash_onto="--squash-onto=$squash_onto"
71 - test -n "$onto_name" && onto_name="--onto-name=$onto_name"
72 - test -n "$head_name" && head_name="--head-name=$head_name"
73 - test -n "$strategy" && strategy="--strategy=$strategy"
74 - test -n "$strategy_opts" && strategy_opts="--strategy-opts=$strategy_opts"
75 - test -n "$switch_to" && switch_to="--switch-to=$switch_to"
76 - test -n "$cmd" && cmd="--cmd=$cmd"
77 -
78 - exec git rebase--interactive2 "$keep_empty" "$rebase_merges" "$rebase_cousins" \
79 - "$upstream" "$onto" "$squash_onto" "$restrict_revision" \
80 - "$allow_empty_message" "$autosquash" "$verbose" \
81 - "$force_rebase" "$onto_name" "$head_name" "$strategy" \
82 - "$strategy_opts" "$cmd" "$switch_to" \
83 - "$allow_rerere_autoupdate" "$gpg_sign_opt" "$signoff"
84 -}
git-rebase.sh
+1 -1
@@ -223,7 +223,7 @@ run_interactive () {
223 test -n "$cmd" && cmd="--cmd=$cmd"
224 test -n "$action" && action="--$action"
225
226 - exec git rebase--interactive2 "$action" "$keep_empty" "$rebase_merges" "$rebase_cousins" \
226 + exec git rebase--interactive "$action" "$keep_empty" "$rebase_merges" "$rebase_cousins" \
227 "$upstream" "$onto" "$squash_onto" "$restrict_revision" \
228 "$allow_empty_message" "$autosquash" "$verbose" \
229 "$force_rebase" "$onto_name" "$head_name" "$strategy" \
git.c
+1 -1
@@ -518,7 +518,7 @@ static struct cmd_struct commands[] = {
518 { "pull", cmd_pull, RUN_SETUP | NEED_WORK_TREE },
519 { "push", cmd_push, RUN_SETUP },
520 { "read-tree", cmd_read_tree, RUN_SETUP | SUPPORT_SUPER_PREFIX},
521 - { "rebase--interactive2", cmd_rebase__interactive, RUN_SETUP | NEED_WORK_TREE },
521 + { "rebase--interactive", cmd_rebase__interactive, RUN_SETUP | NEED_WORK_TREE },
522 { "rebase--helper", cmd_rebase__helper, RUN_SETUP | NEED_WORK_TREE },
523 { "receive-pack", cmd_receive_pack },
524 { "reflog", cmd_reflog, RUN_SETUP },