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:05 +0300
committerJunio C Hamano <gitster@pobox.com>2022-03-28 20:25:52 +0300
commit1836836593e90b515269b564b384dcf091a4493d (patch)
treea3e5faf9decd687c7fa4cf6b29b9d62adde054ab
parentdab1b7905d0b295f1acef9785bb2b9cbb0fdec84 (diff)
fetch-negotiator: add specific noop initializer
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>
-rw-r--r--fetch-negotiator.c5
-rw-r--r--fetch-negotiator.h8
2 files changed, 13 insertions, 0 deletions
diff --git a/fetch-negotiator.c b/fetch-negotiator.c
index 874797d767..be383367f5 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 ea78868504..e348905a1f 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