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.h | |
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.h')
-rw-r--r-- | transport.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/transport.h b/transport.h index a0bc6a1e9e..12bc08fc33 100644 --- a/transport.h +++ b/transport.h @@ -16,6 +16,7 @@ struct git_transport_options { unsigned update_shallow : 1; unsigned reject_shallow : 1; unsigned deepen_relative : 1; + unsigned refetch : 1; /* see documentation of corresponding flag in fetch-pack.h */ unsigned from_promisor : 1; @@ -216,6 +217,9 @@ void transport_check_allowed(const char *type); /* Filter objects for partial clone and fetch */ #define TRANS_OPT_LIST_OBJECTS_FILTER "filter" +/* Refetch all objects without negotiating */ +#define TRANS_OPT_REFETCH "refetch" + /* Request atomic (all-or-nothing) updates when pushing */ #define TRANS_OPT_ATOMIC "atomic" |