summaryrefslogtreecommitdiffstats
path: root/vendor/gix-negotiate/src/noop.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gix-negotiate/src/noop.rs')
-rw-r--r--vendor/gix-negotiate/src/noop.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/vendor/gix-negotiate/src/noop.rs b/vendor/gix-negotiate/src/noop.rs
new file mode 100644
index 000000000..5eabbb9e4
--- /dev/null
+++ b/vendor/gix-negotiate/src/noop.rs
@@ -0,0 +1,23 @@
+use gix_hash::ObjectId;
+
+use crate::{Error, Negotiator};
+
+pub(crate) struct Noop;
+
+impl Negotiator for Noop {
+ fn known_common(&mut self, _id: ObjectId, _graph: &mut crate::Graph<'_>) -> Result<(), Error> {
+ Ok(())
+ }
+
+ fn add_tip(&mut self, _id: ObjectId, _graph: &mut crate::Graph<'_>) -> Result<(), Error> {
+ Ok(())
+ }
+
+ fn next_have(&mut self, _graph: &mut crate::Graph<'_>) -> Option<Result<ObjectId, Error>> {
+ None
+ }
+
+ fn in_common_with_remote(&mut self, _id: ObjectId, _graph: &mut crate::Graph<'_>) -> Result<bool, Error> {
+ Ok(false)
+ }
+}