gc: add `gc.repackFilterTo` config option
[git.git] / negotiator / noop.c
blobde39028ab7f88058c87f735a79185da2f3b5e749
1 #include "git-compat-util.h"
2 #include "noop.h"
3 #include "../commit.h"
4 #include "../fetch-negotiator.h"
6 static void known_common(struct fetch_negotiator *n UNUSED,
7 struct commit *c UNUSED)
9 /* do nothing */
12 static void add_tip(struct fetch_negotiator *n UNUSED,
13 struct commit *c UNUSED)
15 /* do nothing */
18 static const struct object_id *next(struct fetch_negotiator *n UNUSED)
20 return NULL;
23 static int ack(struct fetch_negotiator *n UNUSED, struct commit *c UNUSED)
26 * This negotiator does not emit any commits, so there is no commit to
27 * be acknowledged. If there is any ack, there is a bug.
29 BUG("ack with noop negotiator, which does not emit any commits");
30 return 0;
33 static void release(struct fetch_negotiator *n UNUSED)
35 /* nothing to release */
38 void noop_negotiator_init(struct fetch_negotiator *negotiator)
40 negotiator->known_common = known_common;
41 negotiator->add_tip = add_tip;
42 negotiator->next = next;
43 negotiator->ack = ack;
44 negotiator->release = release;
45 negotiator->data = NULL;