Documentation/build-docdep.perl: generate sorted output
[git/debian.git] / negotiator / noop.c
blob60569b83501a0d789452a934fcabcfc7aa5b24e4
1 #include "cache.h"
2 #include "noop.h"
3 #include "../commit.h"
4 #include "../fetch-negotiator.h"
6 static void known_common(struct fetch_negotiator *n, struct commit *c)
8 /* do nothing */
11 static void add_tip(struct fetch_negotiator *n, struct commit *c)
13 /* do nothing */
16 static const struct object_id *next(struct fetch_negotiator *n)
18 return NULL;
21 static int ack(struct fetch_negotiator *n, struct commit *c)
24 * This negotiator does not emit any commits, so there is no commit to
25 * be acknowledged. If there is any ack, there is a bug.
27 BUG("ack with noop negotiator, which does not emit any commits");
28 return 0;
31 static void release(struct fetch_negotiator *n)
33 /* nothing to release */
36 void noop_negotiator_init(struct fetch_negotiator *negotiator)
38 negotiator->known_common = known_common;
39 negotiator->add_tip = add_tip;
40 negotiator->next = next;
41 negotiator->ack = ack;
42 negotiator->release = release;
43 negotiator->data = NULL;