summaryrefslogtreecommitdiffstats
path: root/builtin
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2021-09-08 13:24:01 +0200
committerJunio C Hamano <gitster@pobox.com>2021-09-10 00:49:05 +0200
commit516680ba7704c473bb21628aa19cabbd787df4db (patch)
treed934e2d0337a272150524ae6b30e4bc6c27b72dc /builtin
parentsequencer: ensure full index if not ORT strategy (diff)
downloadgit-516680ba7704c473bb21628aa19cabbd787df4db.tar.xz
git-516680ba7704c473bb21628aa19cabbd787df4db.zip
sparse-index: integrate with cherry-pick and rebase
The hard work was already done with 'git merge' and the ORT strategy. Just add extra tests to see that we get the expected results in the non-conflict cases. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Reviewed-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/rebase.c6
-rw-r--r--builtin/revert.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 33e0961900..27433d7c5a 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -559,6 +559,9 @@ int cmd_rebase__interactive(int argc, const char **argv, const char *prefix)
argc = parse_options(argc, argv, prefix, options,
builtin_rebase_interactive_usage, PARSE_OPT_KEEP_ARGV0);
+ prepare_repo_settings(the_repository);
+ the_repository->settings.command_requires_full_index = 0;
+
if (!is_null_oid(&squash_onto))
opts.squash_onto = &squash_onto;
@@ -1430,6 +1433,9 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
usage_with_options(builtin_rebase_usage,
builtin_rebase_options);
+ prepare_repo_settings(the_repository);
+ the_repository->settings.command_requires_full_index = 0;
+
options.allow_empty_message = 1;
git_config(rebase_config, &options);
/* options.gpg_sign_opt will be either "-S" or NULL */
diff --git a/builtin/revert.c b/builtin/revert.c
index 237f2f18d4..6c4c22691b 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -136,6 +136,9 @@ static int run_sequencer(int argc, const char **argv, struct replay_opts *opts)
PARSE_OPT_KEEP_ARGV0 |
PARSE_OPT_KEEP_UNKNOWN);
+ prepare_repo_settings(the_repository);
+ the_repository->settings.command_requires_full_index = 0;
+
/* implies allow_empty */
if (opts->keep_redundant_commits)
opts->allow_empty = 1;