Clean up after the removal of the scripted rebase
cover Clean up after the removal of the scripted rebase
Technically, there is still one part that is scripted: git rebase --preserve-merges. But that is already deprecated, and the remaining parts really are no longer scripted.
Meaning that we do not need git-rebase--am.sh.
While at it, clean up a few other places that reference the scripted rebase, and also move the functions from git-rebase--common.sh directly into the -p backend (because it is the sole remaining user).
Johannes Schindelin (5):
Drop unused git-rebase--am.sh
t3400: stop referring to the scripted rebase
.gitignore: there is no longer a built-in git-rebase--interactive
sequencer: the am and rebase--interactive scripts are gone
rebase: fold git-rebase--common into the -p backend
.gitignore | 3 -- Makefile | 2 - builtin/rebase.c | 7 +-- git-rebase--am.sh | 85 ---------------------------------- git-rebase--common.sh | 69 --------------------------- git-rebase--preserve-merges.sh | 55 ++++++++++++++++++++++ sequencer.c | 2 +- t/t3400-rebase.sh | 2 +- 8 files changed, 58 insertions(+), 167 deletions(-) delete mode 100644 git-rebase--am.sh delete mode 100644 git-rebase--common.sh
base-commit: ab15ad1a3b4b04a29415aef8c9afa2f64fc194a2
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-194%2Fdscho%2Fdrop-rebase--am.sh-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-194/dscho/drop-rebase--am.sh-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/194
Signature · 1 line
gitgitgadget
PATCH 1/5 Drop unused git-rebase--am.sh
From: Johannes Schindelin <[email protected]>
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.
--- .gitignore | 1 - Makefile | 1 - builtin/rebase.c | 4 --- git-rebase--am.sh | 85 ----------------------------------------------- 4 files changed, 91 deletions(-) delete mode 100644 git-rebase--am.sh
.gitignore +0 -1
@@ -122,7 +122,6 @@ /git-range-diff /git-read-tree /git-rebase -/git-rebase--am /git-rebase--common /git-rebase--interactive /git-rebase--preserve-merges
Makefile +0 -1
@@ -624,7 +624,6 @@ SCRIPT_SH += git-web--browse.sh SCRIPT_LIB += git-mergetool--lib SCRIPT_LIB += git-parse-remote -SCRIPT_LIB += git-rebase--am SCRIPT_LIB += git-rebase--common SCRIPT_LIB += git-rebase--preserve-merges SCRIPT_LIB += git-sh-setup
builtin/rebase.c +0 -4
@@ -1153,10 +1153,6 @@ static int run_specific_rebase(struct rebase_options *opts, enum action action) }switch (opts->type) { -case REBASE_AM : - backend ="git-rebase--am" ; - backend_func ="git_rebase__am" ; -break ;case REBASE_PRESERVE_MERGES : backend ="git-rebase--preserve-merges" ; backend_func ="git_rebase__preserve_merges" ;
git-rebase--am.sh deleted +0 -85
85 lines not on this page · raw message
Signature · 1 line
gitgitgadget
PATCH 2/5 t3400: stop referring to the scripted rebase
In reply to Johannes Schindelin via GitGitGadgetFrom: Johannes Schindelin <[email protected]>
One test case's title mentioned the then-current implementation detail that the --am backend was implemented in git-rebase--am.sh.
This is no longer the case, so let's update the title to reflect the current reality.
--- t/t3400-rebase.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
t/t3400-rebase.sh +1 -1
@@ -285,7 +285,7 @@ EOF test_cmp From_.msg out ' -test_expect_success 'rebase--am.sh and --show-current-patch' ' +test_expect_success 'rebase --am and --show-current-patch' ' test_create_repo conflict-apply && ( cd conflict-apply &&
Signature · 1 line
gitgitgadget
PATCH 3/5 .gitignore: there is no longer a built-in `git-rebase--interactive`
In reply to Johannes Schindelin via GitGitGadgetFrom: Johannes Schindelin <[email protected]>
This went away in 0609b741a4 (rebase -i: combine rebase--interactive.c with rebase.c, 2019-04-17).
--- .gitignore | 1 - 1 file changed, 1 deletion(-)
.gitignore +0 -1
@@ -123,7 +123,6 @@ /git-read-tree /git-rebase /git-rebase--common -/git-rebase--interactive /git-rebase--preserve-merges /git-receive-pack /git-reflog
Signature · 1 line
gitgitgadget
PATCH 4/5 sequencer: the `am` and `rebase--interactive` scripts are gone
In reply to Johannes Schindelin via GitGitGadgetFrom: Johannes Schindelin <[email protected]>
Update a code comment that referred to those files as if they were still there.
--- sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sequencer.c +1 -1
@@ -767,7 +767,7 @@ static int parse_key_value_squoted(char *buf, struct string_list *list)* GIT_AUTHOR_DATE='$author_date' * * where $author_name, $author_email and $author_date are quoted. We are strict -* with our parsing, as the file was meant to be eval'd in the old +* with our parsing, as the file was meant to be eval'd in the now-removed * git-am.sh/git-rebase--interactive.sh scripts, and thus if the file differs * from what this function expects, it is better to bail out than to do * something that the user does not expect.
Signature · 1 line
gitgitgadget
PATCH 5/5 rebase: fold git-rebase--common into the -p backend
In reply to Johannes Schindelin via GitGitGadgetFrom: Johannes Schindelin <[email protected]>
The only remaining scripted part of git rebase is the --preserve-merges backend. Meaning: there is little reason to keep the "library of common rebase functions" as a separate file.
While moving the functions to git-rebase--preserve-merges.sh, we also drop the move_to_original_branch function that is no longer used.
--- .gitignore | 1 - Makefile | 1 - builtin/rebase.c | 3 +- git-rebase--common.sh | 69 ---------------------------------- git-rebase--preserve-merges.sh | 55 +++++++++++++++++++++++++++ 5 files changed, 56 insertions(+), 73 deletions(-) delete mode 100644 git-rebase--common.sh
.gitignore +0 -1
@@ -122,7 +122,6 @@ /git-range-diff /git-read-tree /git-rebase -/git-rebase--common /git-rebase--preserve-merges /git-receive-pack /git-reflog
Makefile +0 -1
@@ -624,7 +624,6 @@ SCRIPT_SH += git-web--browse.sh SCRIPT_LIB += git-mergetool--lib SCRIPT_LIB += git-parse-remote -SCRIPT_LIB += git-rebase--common SCRIPT_LIB += git-rebase--preserve-merges SCRIPT_LIB += git-sh-setup SCRIPT_LIB += git-sh-i18n
builtin/rebase.c +1 -2
@@ -1163,8 +1163,7 @@ static int run_specific_rebase(struct rebase_options *opts, enum action action) }strbuf_addf (&script_snippet, -". git-sh-setup && . git-rebase--common &&" -" . %s && %s" , backend, backend_func); +". git-sh-setup && . %s && %s" , backend, backend_func); argv[0 ] = script_snippet.buf; status =run_command_v_opt (argv,RUN_USING_SHELL );
git-rebase--common.sh deleted +0 -69
69 lines not on this page · raw message
git-rebase--preserve-merges.sh +55 -0
61 lines not on this page · raw message
Signature · 1 line
gitgitgadget