Drop unused git-rebase--am.sh
Since 21853626ea (built-in rebase: call `git am` directly, 2019-01-18), the built-in rebase already uses the built-in `git am` directly. Now that d03ebd411c (rebase: remove the rebase.useBuiltin setting, 2019-03-18) even removed the scripted rebase, there is no longer any user of `git-rebase--am.sh`, so let's just remove it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
Jul 31, 2019 at 08:18 UTC
d5b581f228fb8b2ec3a9d6225f657dff7d28925d
4 files changed
-91
.gitignore
-1
@@ -122,7 +122,6 @@
122
/git-range-diff
123
/git-read-tree
124
/git-rebase
125
-/git-rebase--am
125
/git-rebase--common
126
/git-rebase--interactive
127
/git-rebase--preserve-merges
Makefile
-1
@@ -624,7 +624,6 @@ SCRIPT_SH += git-web--browse.sh
624
625
SCRIPT_LIB += git-mergetool--lib
626
SCRIPT_LIB += git-parse-remote
627
-SCRIPT_LIB += git-rebase--am
627
SCRIPT_LIB += git-rebase--common
628
SCRIPT_LIB += git-rebase--preserve-merges
629
SCRIPT_LIB += git-sh-setup
builtin/rebase.c
-4
@@ -1153,10 +1153,6 @@ static int run_specific_rebase(struct rebase_options *opts, enum action action)
1153
}
1154
1155
switch (opts->type) {
1156
- case REBASE_AM:
1157
- backend = "git-rebase--am";
1158
- backend_func = "git_rebase__am";
1159
- break;
1156
case REBASE_PRESERVE_MERGES:
1157
backend = "git-rebase--preserve-merges";
1158
backend_func = "git_rebase__preserve_merges";
git-rebase--am.sh
deleted
-85
@@ -1,85 +0,0 @@
1
-# This shell script fragment is sourced by git-rebase to implement
2
-# its default, fast, patch-based, non-interactive mode.
3
-#
4
-# Copyright (c) 2010 Junio C Hamano.
5
-#
6
-
7
-git_rebase__am () {
8
-
9
-case "$action" in
10
-continue)
11
- git am --resolved --resolvemsg="$resolvemsg" \
12
- ${gpg_sign_opt:+"$gpg_sign_opt"} &&
13
- move_to_original_branch
14
- return
15
- ;;
16
-skip)
17
- git am --skip --resolvemsg="$resolvemsg" &&
18
- move_to_original_branch
19
- return
20
- ;;
21
-show-current-patch)
22
- exec git am --show-current-patch
23
- ;;
24
-esac
25
-
26
-if test -z "$rebase_root"
27
- # this is now equivalent to ! -z "$upstream"
28
-then
29
- revisions=$upstream...$orig_head
30
-else
31
- revisions=$onto...$orig_head
32
-fi
33
-
34
-ret=0
35
-rm -f "$GIT_DIR/rebased-patches"
36
-
37
-git format-patch -k --stdout --full-index --cherry-pick --right-only \
38
- --src-prefix=a/ --dst-prefix=b/ --no-renames --no-cover-letter \
39
- --pretty=mboxrd --topo-order \
40
- $git_format_patch_opt \
41
- "$revisions" ${restrict_revision+^$restrict_revision} \
42
- >"$GIT_DIR/rebased-patches"
43
-ret=$?
44
-
45
-if test 0 != $ret
46
-then
47
- rm -f "$GIT_DIR/rebased-patches"
48
- case "$head_name" in
49
- refs/heads/*)
50
- git checkout -q "$head_name"
51
- ;;
52
- *)
53
- git checkout -q "$orig_head"
54
- ;;
55
- esac
56
-
57
- cat >&2 <<-EOF
58
-
59
- git encountered an error while preparing the patches to replay
60
- these revisions:
61
-
62
- $revisions
63
-
64
- As a result, git cannot rebase them.
65
- EOF
66
- return $ret
67
-fi
68
-
69
-git am $git_am_opt --rebasing --resolvemsg="$resolvemsg" \
70
- --patch-format=mboxrd \
71
- $allow_rerere_autoupdate \
72
- ${gpg_sign_opt:+"$gpg_sign_opt"} <"$GIT_DIR/rebased-patches"
73
-ret=$?
74
-
75
-rm -f "$GIT_DIR/rebased-patches"
76
-
77
-if test 0 != $ret
78
-then
79
- test -d "$state_dir" && write_basic_state
80
- return $ret
81
-fi
82
-
83
-move_to_original_branch
84
-
85
-}