summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-09-20 15:20:44 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-09-20 15:20:45 -0700
commita16dd1374023d1a5f6ee7c48661e0ed53a954391 (patch)
tree73d6f7e3c1f5ae4ad74cfc76b88002625f948c3f /builtin
parentMerge branch 'ds/sparse-index-ignored-files' (diff)
parentsparse-index: integrate with cherry-pick and rebase (diff)
downloadtgif-a16dd1374023d1a5f6ee7c48661e0ed53a954391.tar.xz
Merge branch 'ds/mergies-with-sparse-index'
Various mergy operations have been prepared to work efficiently with the sparse index. * ds/mergies-with-sparse-index: sparse-index: integrate with cherry-pick and rebase sequencer: ensure full index if not ORT strategy t1092: add cherry-pick, rebase tests merge-ort: expand only for out-of-cone conflicts merge: make sparse-aware with ORT diff: ignore sparse paths in diffstat
Diffstat (limited to 'builtin')
-rw-r--r--builtin/merge.c3
-rw-r--r--builtin/rebase.c6
-rw-r--r--builtin/revert.c3
3 files changed, 12 insertions, 0 deletions
diff --git a/builtin/merge.c b/builtin/merge.c
index d2c52b6e97..f6d03ddf62 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -1276,6 +1276,9 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
if (argc == 2 && !strcmp(argv[1], "-h"))
usage_with_options(builtin_merge_usage, builtin_merge_options);
+ prepare_repo_settings(the_repository);
+ the_repository->settings.command_requires_full_index = 0;
+
/*
* Check if we are _not_ on a detached HEAD, i.e. if there is a
* current branch.
diff --git a/builtin/rebase.c b/builtin/rebase.c
index eb01f4d790..0150893a3b 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -560,6 +560,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;
@@ -1431,6 +1434,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 2e13660e4b..51776abea6 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;