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
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-05-21 01:26:58 +0300
committerJunio C Hamano <gitster@pobox.com>2022-05-21 01:26:58 +0300
commitacdeb10f91da939135fbacb847792ae237450d7d (patch)
tree1989381cb6b65293630bd86533abde899ab52130 /builtin
parent5a9253cd45494b7b8aed8166529c5c451086f451 (diff)
parent124b05b23005437fa5fb91863bde2a8f5840e164 (diff)
Merge branch 'ds/sparse-colon-path'
"git show :<path>" learned to work better with the sparse-index feature. * ds/sparse-colon-path: rev-parse: integrate with sparse index object-name: diagnose trees in index properly object-name: reject trees found in the index show: integrate with the sparse index t1092: add compatibility tests for 'git show'
Diffstat (limited to 'builtin')
-rw-r--r--builtin/log.c5
-rw-r--r--builtin/rev-parse.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/builtin/log.c b/builtin/log.c
index 3ac479bec3..a301433442 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -669,6 +669,11 @@ int cmd_show(int argc, const char **argv, const char *prefix)
init_log_defaults();
git_config(git_log_config, NULL);
+ if (the_repository->gitdir) {
+ prepare_repo_settings(the_repository);
+ the_repository->settings.command_requires_full_index = 0;
+ }
+
memset(&match_all, 0, sizeof(match_all));
repo_init_revisions(the_repository, &rev, prefix);
git_config(grep_config, &rev.grep_filter);
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c
index 8480a59f57..4fc6185b2d 100644
--- a/builtin/rev-parse.c
+++ b/builtin/rev-parse.c
@@ -723,6 +723,9 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
prefix = setup_git_directory();
git_config(git_default_config, NULL);
did_repo_setup = 1;
+
+ prepare_repo_settings(the_repository);
+ the_repository->settings.command_requires_full_index = 0;
}
if (!strcmp(arg, "--")) {