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-04-04 20:56:23 +0300
committerJunio C Hamano <gitster@pobox.com>2022-04-04 20:56:23 +0300
commit0f5e8851737282c9dd342032fe9a2d8b10367c9a (patch)
tree916a4802b214e0c8a03548a166bb32b40200e89d /transport.c
parent1b54f5b89ac2efb5256b1870fabef28ea55e2f20 (diff)
parent4963d3e41fa454500760fe6f8fb1bab890c1c3eb (diff)
Merge branch 'rc/fetch-refetch'
"git fetch --refetch" learned to fetch everything without telling the other side what we already have, which is useful when you cannot trust what you have in the local object store. * rc/fetch-refetch: docs: mention --refetch fetch option fetch: after refetch, encourage auto gc repacking t5615-partial-clone: add test for fetch --refetch fetch: add --refetch option builtin/fetch-pack: add --refetch option fetch-pack: add refetch fetch-negotiator: add specific noop initializer
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/transport.c b/transport.c
index 70e9840a90..3d64a43ab3 100644
--- a/transport.c
+++ b/transport.c
@@ -250,6 +250,9 @@ static int set_git_option(struct git_transport_options *opts,
list_objects_filter_die_if_populated(&opts->filter_options);
parse_list_objects_filter(&opts->filter_options, value);
return 0;
+ } else if (!strcmp(name, TRANS_OPT_REFETCH)) {
+ opts->refetch = !!value;
+ return 0;
} else if (!strcmp(name, TRANS_OPT_REJECT_SHALLOW)) {
opts->reject_shallow = !!value;
return 0;
@@ -384,6 +387,7 @@ static int fetch_refs_via_pack(struct transport *transport,
args.update_shallow = data->options.update_shallow;
args.from_promisor = data->options.from_promisor;
args.filter_options = data->options.filter_options;
+ args.refetch = data->options.refetch;
args.stateless_rpc = transport->stateless_rpc;
args.server_options = transport->server_options;
args.negotiation_tips = data->options.negotiation_tips;