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
path: root/t/helper
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2023-11-24 14:10:30 +0300
committerJunio C Hamano <gitster@pobox.com>2023-11-26 04:10:47 +0300
commitb9d0991cc702204e14e65abf95d5fc24305e542b (patch)
tree30e793fd3f63c4594413233ab790903d64226794 /t/helper
parentbc5204569f7db44d22477485afd52ea410d83743 (diff)
t6429: remove switching aspects of fast-rebase
At the time t6429 was written, merge-ort was still under development, did not have quite as many tests, and certainly was not widely deployed. Since t6429 was exercising some codepaths just a little differently, we thought having them also test the "merge_switch_to_result()" bits of merge-ort was useful even though they weren't intrinsic to the real point of these tests. However, the value provided by doing extra testing of the "merge_switch_to_result()" bits has decreased a bit over time, and it's actively making it harder to refactor `test-tool fast-rebase` into `git replay`, which we are going to do in following commits. Dispense with these bits. Co-authored-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper')
-rw-r--r--t/helper/test-fast-rebase.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/t/helper/test-fast-rebase.c b/t/helper/test-fast-rebase.c
index cac20a72b3..2bfab66b1b 100644
--- a/t/helper/test-fast-rebase.c
+++ b/t/helper/test-fast-rebase.c
@@ -194,7 +194,7 @@ int cmd__fast_rebase(int argc, const char **argv)
last_commit = create_commit(result.tree, commit, last_commit);
}
- merge_switch_to_result(&merge_opt, head_tree, &result, 1, !result.clean);
+ merge_finalize(&merge_opt, &result);
if (result.clean < 0)
exit(128);
@@ -213,9 +213,6 @@ int cmd__fast_rebase(int argc, const char **argv)
}
if (create_symref("HEAD", branch_name.buf, reflog_msg.buf) < 0)
die(_("unable to update HEAD"));
-
- prime_cache_tree(the_repository, the_repository->index,
- result.tree);
} else {
fprintf(stderr, "\nAborting: Hit a conflict.\n");
strbuf_addf(&reflog_msg, "rebase progress up to %s",
@@ -228,10 +225,6 @@ int cmd__fast_rebase(int argc, const char **argv)
die("Failed to update %s", argv[4]);
}
}
- if (write_locked_index(&the_index, &lock,
- COMMIT_LOCK | SKIP_IF_UNCHANGED))
- die(_("unable to write %s"), get_index_file());
-
ret = (result.clean == 0);
cleanup:
strbuf_release(&reflog_msg);