aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/rev-parse.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-01-16 10:11:57 -0800
committerJunio C Hamano <gitster@pobox.com>2024-01-16 10:11:57 -0800
commit32c6fc3e3036613d80f1217a833d9f3868717b41 (patch)
treea10334218862177c088bd4da657e51b2b7745906 /builtin/rev-parse.c
parentMerge branch 'ps/reftable-fixes-and-optims' (diff)
parentt9500: write "extensions.refstorage" into config (diff)
downloadgit-32c6fc3e3036613d80f1217a833d9f3868717b41.tar.gz
git-32c6fc3e3036613d80f1217a833d9f3868717b41.zip
Merge branch 'ps/refstorage-extension'
Introduce a new extension "refstorage" so that we can mark a repository that uses a non-default ref backend, like reftable. * ps/refstorage-extension: t9500: write "extensions.refstorage" into config builtin/clone: introduce `--ref-format=` value flag builtin/init: introduce `--ref-format=` value flag builtin/rev-parse: introduce `--show-ref-format` flag t: introduce GIT_TEST_DEFAULT_REF_FORMAT envvar setup: introduce GIT_DEFAULT_REF_FORMAT envvar setup: introduce "extensions.refStorage" extension setup: set repository's formats on init setup: start tracking ref storage format refs: refactor logic to look up storage backends worktree: skip reading HEAD when repairing worktrees t: introduce DEFAULT_REPO_FORMAT prereq
Diffstat (limited to 'builtin/rev-parse.c')
-rw-r--r--builtin/rev-parse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c
index 917f122440..d08987646a 100644
--- a/builtin/rev-parse.c
+++ b/builtin/rev-parse.c
@@ -1062,6 +1062,10 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
puts(the_hash_algo->name);
continue;
}
+ if (!strcmp(arg, "--show-ref-format")) {
+ puts(ref_storage_format_to_name(the_repository->ref_storage_format));
+ continue;
+ }
if (!strcmp(arg, "--end-of-options")) {
seen_end_of_options = 1;
if (filter & (DO_FLAGS | DO_REVS))