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:
authorRobert Coup <robert@coup.net.nz>2022-03-28 17:02:08 +0300
committerJunio C Hamano <gitster@pobox.com>2022-03-28 20:25:52 +0300
commit3c7bab06e12922fbcb375187eb60ac426fc72a3a (patch)
treee1ebe117e15be200ddd71cafdb2bff01ad64a25a /transport-helper.c
parent869a0eb4ebddad9ea758464526524ed06f5a13a9 (diff)
fetch: add --refetch option
Teach fetch and transports the --refetch option to force a full fetch without negotiating common commits with the remote. Use when applying a new partial clone filter to refetch all matching objects. Signed-off-by: Robert Coup <robert@coup.net.nz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport-helper.c')
-rw-r--r--transport-helper.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/transport-helper.c b/transport-helper.c
index a0297b0986..b4dbbabb0c 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -715,6 +715,9 @@ static int fetch_refs(struct transport *transport,
if (data->transport_options.update_shallow)
set_helper_option(transport, "update-shallow", "true");
+ if (data->transport_options.refetch)
+ set_helper_option(transport, "refetch", "true");
+
if (data->transport_options.filter_options.choice) {
const char *spec = expand_list_objects_filter_spec(
&data->transport_options.filter_options);