diff mbox series

[1/6] fetch-negotiator: add specific noop initializor

Message ID ca50ce77ae47268a3aab0c9366fad8a79ab8ecdb.1643730593.git.gitgitgadget@gmail.com (mailing list archive)
State Accepted
Commit 1836836593e90b515269b564b384dcf091a4493d
Headers show
Series partial-clone: add ability to refetch with expanded filter | expand

Commit Message

Robert Coup Feb. 1, 2022, 3:49 p.m. UTC
From: Robert Coup <robert@coup.net.nz>

Add a specific initializor for the noop fetch negotiator. This is
introduced to support allowing partial clones to skip commit negotiation
when refetching to apply a modified filter.

Signed-off-by: Robert Coup <robert@coup.net.nz>
---
 fetch-negotiator.c | 5 +++++
 fetch-negotiator.h | 8 ++++++++
 2 files changed, 13 insertions(+)
diff mbox series

Patch

diff --git a/fetch-negotiator.c b/fetch-negotiator.c
index 273390229fe..fe316afbf03 100644
--- a/fetch-negotiator.c
+++ b/fetch-negotiator.c
@@ -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);
+}
diff --git a/fetch-negotiator.h b/fetch-negotiator.h
index ea78868504b..e348905a1f0 100644
--- a/fetch-negotiator.h
+++ b/fetch-negotiator.h
@@ -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