diff options
author | Robert Coup <robert@coup.net.nz> | 2022-03-28 16:02:08 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-03-28 19:25:52 +0200 |
commit | 3c7bab06e12922fbcb375187eb60ac426fc72a3a (patch) | |
tree | e1ebe117e15be200ddd71cafdb2bff01ad64a25a /transport-helper.c | |
parent | builtin/fetch-pack: add --refetch option (diff) | |
download | git-3c7bab06e12922fbcb375187eb60ac426fc72a3a.tar.xz git-3c7bab06e12922fbcb375187eb60ac426fc72a3a.zip |
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.c | 3 |
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); |