parse-options-cb: stop clamping "--abbrev=" to hash length
[git/gitster.git] / negotiator / noop.c
blob65e3c200084aa4a198145e2433ad6055425ae2fa
1 #include "git-compat-util.h"
2 #include "noop.h"
3 #include "../fetch-negotiator.h"
5 static void known_common(struct fetch_negotiator *n UNUSED,
6 struct commit *c UNUSED)
8 /* do nothing */
11 static void add_tip(struct fetch_negotiator *n UNUSED,
12 struct commit *c UNUSED)
14 /* do nothing */
17 static const struct object_id *next(struct fetch_negotiator *n UNUSED)
19 return NULL;
22 static int ack(struct fetch_negotiator *n UNUSED, struct commit *c UNUSED)
25 * This negotiator does not emit any commits, so there is no commit to
26 * be acknowledged. If there is any ack, there is a bug.
28 BUG("ack with noop negotiator, which does not emit any commits");
29 return 0;
32 static void release(struct fetch_negotiator *n UNUSED)
34 /* nothing to release */
37 void noop_negotiator_init(struct fetch_negotiator *negotiator)
39 negotiator->known_common = known_common;
40 negotiator->add_tip = add_tip;
41 negotiator->next = next;
42 negotiator->ack = ack;
43 negotiator->release = release;
44 negotiator->data = NULL;