aboutsummaryrefslogtreecommitdiffstats
path: root/remote-curl.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-12-27 14:52:28 -0800
committerJunio C Hamano <gitster@pobox.com>2023-12-27 14:52:28 -0800
commit94e8e404a7ceaa4cbc34c2406e5dff4b08a49e85 (patch)
treece917e9a9e79ce0e5638a98b911b87ff45fd08c9 /remote-curl.c
parent6db745e1f5ae2ea71f8c7d6b99bf37c8e1a7acfb (diff)
parent18c9cb7524c13ca88ee334a707f281c2e80d5fdf (diff)
downloadgit-94e8e404a7ceaa4cbc34c2406e5dff4b08a49e85.tar.gz
Merge branch 'ps/clone-into-reftable-repository'
"git clone" has been prepared to allow cloning a repository with non-default hash function into a repository that uses the reftable backend. * ps/clone-into-reftable-repository: builtin/clone: create the refdb with the correct object format builtin/clone: skip reading HEAD when retrieving remote builtin/clone: set up sparse checkout later builtin/clone: fix bundle URIs with mismatching object formats remote-curl: rediscover repository when fetching refs setup: allow skipping creation of the refdb setup: extract function to create the refdb
Diffstat (limited to 'remote-curl.c')
-rw-r--r--remote-curl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/remote-curl.c b/remote-curl.c
index ef05752ca5..fc29757b65 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -1564,8 +1564,11 @@ int cmd_main(int argc, const char **argv)
if (buf.len == 0)
break;
if (starts_with(buf.buf, "fetch ")) {
- if (nongit)
- die(_("remote-curl: fetch attempted without a local repo"));
+ if (nongit) {
+ setup_git_directory_gently(&nongit);
+ if (nongit)
+ die(_("remote-curl: fetch attempted without a local repo"));
+ }
parse_fetch(&buf);
} else if (!strcmp(buf.buf, "list") || starts_with(buf.buf, "list ")) {