]> git.ipfire.org Git - thirdparty/git.git/commitdiff
fetch-negotiator: add specific noop initializer
authorRobert Coup <robert@coup.net.nz>
Mon, 28 Mar 2022 14:02:05 +0000 (14:02 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 28 Mar 2022 17:25:52 +0000 (10:25 -0700)
Add a specific initializer for the noop fetch negotiator. This is
introduced to support allowing partial clones to skip commit negotiation
when performing a "refetch".

Signed-off-by: Robert Coup <robert@coup.net.nz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fetch-negotiator.c
fetch-negotiator.h

index 874797d767bb1abd8144be9412e7e258f3d8ad9d..be383367f55a537944bcf6b43aa7e158cb7f5cad 100644 (file)
@@ -23,3 +23,8 @@ void fetch_negotiator_init(struct repository *r,
                return;
        }
 }
+
+void fetch_negotiator_init_noop(struct fetch_negotiator *negotiator)
+{
+       noop_negotiator_init(negotiator);
+}
index ea78868504bdcff0121c40cd40b6857df1680cfc..e348905a1f0008950c66aca1c7b1d69a1253cccf 100644 (file)
@@ -53,7 +53,15 @@ struct fetch_negotiator {
        void *data;
 };
 
+/*
+ * Initialize a negotiator based on the repository settings.
+ */
 void fetch_negotiator_init(struct repository *r,
                           struct fetch_negotiator *negotiator);
 
+/*
+ * Initialize a noop negotiator.
+ */
+void fetch_negotiator_init_noop(struct fetch_negotiator *negotiator);
+
 #endif