Merge branch 'sa/send-email-dedup-some-headers'
[git.git] / builtin / serve.c
blobd3fd240bb30f2a87a2e23e79a04c52b574a1f32c
1 #include "cache.h"
2 #include "builtin.h"
3 #include "parse-options.h"
4 #include "serve.h"
6 static char const * const serve_usage[] = {
7 N_("git serve [<options>]"),
8 NULL
9 };
11 int cmd_serve(int argc, const char **argv, const char *prefix)
13 struct serve_options opts = SERVE_OPTIONS_INIT;
15 struct option options[] = {
16 OPT_BOOL(0, "stateless-rpc", &opts.stateless_rpc,
17 N_("quit after a single request/response exchange")),
18 OPT_BOOL(0, "advertise-capabilities", &opts.advertise_capabilities,
19 N_("exit immediately after advertising capabilities")),
20 OPT_END()
23 /* ignore all unknown cmdline switches for now */
24 argc = parse_options(argc, argv, prefix, options, serve_usage,
25 PARSE_OPT_KEEP_DASHDASH |
26 PARSE_OPT_KEEP_UNKNOWN);
27 serve(&opts);
29 return 0;