Codebergdnkl

foot

master
ply5 git calls523 ms28 KiB3 cachedprotocol v2
629 lines19 KiBRaw
1#include <errno.h>
2#include <getopt.h>
3#include <limits.h>
4#include <signal.h>
5#include <stdbool.h>
6#include <stdint.h>
7#include <stdio.h>
8#include <stdlib.h>
9#include <string.h>
10#include <unistd.h>
12#include <sys/socket.h>
13#include <sys/un.h>
14#include <sys/stat.h>
16#include <tllist.h>
18#define LOG_MODULE "foot-client"
19#define LOG_ENABLE_DBG 0
20#include "log.h"
21#include "client-protocol.h"
22#include "debug.h"
23#include "foot-features.h"
24#include "macros.h"
25#include "util.h"
26#include "xmalloc.h"
27#include "uri.h"
29extern char **environ;
31struct string {
32 size_t len;
33 char *str;
34};
35typedef tll(struct string) string_list_t;
37static volatile sig_atomic_t aborted = 0;
38static volatile sig_atomic_t sigusr = 0;
40static void
41sigint_handler(int signo)
43 aborted = 1;
46static void
47sigusr_handler(int signo)
49 sigusr = signo;
52static ssize_t
53sendall(int sock, const void *_buf, size_t len)
55 const uint8_t *buf = _buf;
56 size_t left = len;
58 while (left > 0) {
59 ssize_t r = send(sock, buf, left, MSG_NOSIGNAL);
60 if (r < 0) {
61 if (errno == EINTR)
62 continue;
63 return r;
64 }
66 buf += r;
67 left -= r;
68 }
70 return len;
73static void
74print_usage(const char *prog_name)
76 static const char options[] =
77 "\nOptions:\n"
78 " -t,--term=TERM value to set the environment variable TERM to (" FOOT_DEFAULT_TERM ")\n"
79 " -T,--title=TITLE initial window title (foot)\n"
80 " -a,--app-id=ID window application ID (foot)\n"
81 " --toplevel-tag=TAG set a custom toplevel tag\n"
82 " -w,--window-size-pixels=WIDTHxHEIGHT initial width and height, in pixels\n"
83 " -W,--window-size-chars=WIDTHxHEIGHT initial width and height, in characters\n"
84 " -m,--maximized start in maximized mode\n"
85 " -F,--fullscreen start in fullscreen mode\n"
86 " -L,--login-shell start shell as a login shell\n"
87 " -D,--working-directory=DIR directory to start in (CWD)\n"
88 " -s,--server-socket=PATH path to the server UNIX domain socket (default=$XDG_RUNTIME_DIR/foot-$WAYLAND_DISPLAY.sock)\n"
89 " -H,--hold remain open after child process exits\n"
90 " -N,--no-wait detach the client process from the running terminal, exiting immediately\n"
91 " -o,--override=[section.]key=value override configuration option\n"
92 " -E, --client-environment exec shell using footclient's environment, instead of the server's\n"
93 " -d,--log-level={info|warning|error|none} log level (warning)\n"
94 " -l,--log-colorize=[{never|always|auto}] enable/disable colorization of log output on stderr\n"
95 " -v,--version show the version number and quit\n"
96 " -e ignored (for compatibility with xterm -e)\n";
98 printf("Usage: %s [OPTIONS...]\n", prog_name);
99 printf("Usage: %s [OPTIONS...] command [ARGS...]\n", prog_name);
100 puts(options);
103static bool NOINLINE
104push_string(string_list_t *string_list, const char *s, uint64_t *total_len)
106 size_t len = strlen(s) + 1;
107 if (len >= 1 << (8 * sizeof(uint16_t))) {
108 LOG_ERR("string length overflow");
109 return false;
110 }
112 struct string o = {len, xstrdup(s)};
113 tll_push_back(*string_list, o);
114 *total_len += sizeof(struct client_string) + o.len;
115 return true;
118static void
119free_string_list(string_list_t *string_list)
121 tll_foreach(*string_list, it) {
122 free(it->item.str);
123 tll_remove(*string_list, it);
124 }
127static bool
128send_string_list(int fd, const string_list_t *string_list)
130 tll_foreach(*string_list, it) {
131 const struct client_string s = {it->item.len};
132 if (sendall(fd, &s, sizeof(s)) < 0 ||
133 sendall(fd, it->item.str, s.len) < 0)
134 {
135 LOG_ERRNO("failed to send setup packet to server");
136 return false;
137 }
138 }
140 return true;
143enum {
144 TOPLEVEL_TAG_OPTION = CHAR_MAX + 1,
145};
147int
148main(int argc, char *const *argv)
150 /* Custom exit code, to enable users to differentiate between foot
151 * itself failing, and the client application failing */
152 static const int foot_exit_failure = -36;
153 int ret = foot_exit_failure;
155 const char *const prog_name = argc > 0 ? argv[0] : "<nullptr>";
157 static const struct option longopts[] = {
158 {"term", required_argument, NULL, 't'},
159 {"title", required_argument, NULL, 'T'},
160 {"app-id", required_argument, NULL, 'a'},
161 {"class", required_argument, NULL, 'a'},
162 {"toplevel-tag", required_argument, NULL, TOPLEVEL_TAG_OPTION},
163 {"window-size-pixels", required_argument, NULL, 'w'},
164 {"window-size-chars", required_argument, NULL, 'W'},
165 {"maximized", no_argument, NULL, 'm'},
166 {"fullscreen", no_argument, NULL, 'F'},
167 {"login-shell", no_argument, NULL, 'L'},
168 {"working-directory", required_argument, NULL, 'D'},
169 {"server-socket", required_argument, NULL, 's'},
170 {"hold", no_argument, NULL, 'H'},
171 {"no-wait", no_argument, NULL, 'N'},
172 {"override", required_argument, NULL, 'o'},
173 {"client-environment", no_argument, NULL, 'E'},
174 {"log-level", required_argument, NULL, 'd'},
175 {"log-colorize", optional_argument, NULL, 'l'},
176 {"version", no_argument, NULL, 'v'},
177 {"help", no_argument, NULL, 'h'},
178 {NULL, no_argument, NULL, 0},
179 };
181 char *custom_cwd = NULL;
182 const char *server_socket_path = NULL;
183 enum log_class log_level = LOG_CLASS_WARNING;
184 enum log_colorize log_colorize = LOG_COLORIZE_AUTO;
185 bool hold = false;
186 bool client_environment = false;
188 /* Used to format overrides */
189 bool no_wait = false;
191 /* For XDG activation */
192 const char *token = getenv("XDG_ACTIVATION_TOKEN");
193 bool xdga_token = token != NULL;
194 size_t token_len = xdga_token ? strlen(token) + 1 : 0;
196 char buf[1024];
198 /* Total packet length, not (yet) including overrides or argv[] */
199 uint64_t total_len = 0;
201 /* malloc:ed and needs to be in scope of all goto's */
202 int fd = -1;
203 char *_cwd = NULL;
204 struct client_string *cargv = NULL;
205 string_list_t overrides = tll_init();
206 string_list_t envp = tll_init();
208 while (true) {
209 int c = getopt_long(argc, argv, "+t:T:a:w:W:mFLD:s:HNo:Ed:l::veh", longopts, NULL);
210 if (c == -1)
211 break;
213 switch (c) {
214 case 't':
215 snprintf(buf, sizeof(buf), "term=%s", optarg);
216 if (!push_string(&overrides, buf, &total_len))
217 goto err;
218 break;
220 case 'T':
221 snprintf(buf, sizeof(buf), "title=%s", optarg);
222 if (!push_string(&overrides, buf, &total_len))
223 goto err;
224 break;
226 case 'a':
227 snprintf(buf, sizeof(buf), "app-id=%s", optarg);
228 if (!push_string(&overrides, buf, &total_len))
229 goto err;
230 break;
232 case TOPLEVEL_TAG_OPTION:
233 snprintf(buf, sizeof(buf), "toplevel-tag=%s", optarg);
234 if (!push_string(&overrides, buf, &total_len))
235 goto err;
236 break;
238 case 'L':
239 if (!push_string(&overrides, "login-shell=yes", &total_len))
240 goto err;
241 break;
243 case 'D': {
244 // try to parse optarg as a local file URL. if it's not a
245 // URL, use optarg directly
246 char *scheme, *host, *path;
247 if (uri_parse(optarg, strlen(optarg), &scheme, NULL, NULL,
248 &host, NULL, &path, NULL, NULL)) {
249 if (!(streq(scheme, "file") && hostname_is_localhost(host))) {
250 fprintf(stderr, "error: %s: not a local path\n", optarg);
251 free(scheme);
252 free(host);
253 free(path);
254 goto err;
255 }
257 // ownership moved to custom_cwd, freed at err:
258 custom_cwd = path;
259 path = NULL;
260 } else
261 custom_cwd = xstrdup(optarg);
263 free(scheme);
264 free(host);
265 free(path);
267 struct stat st;
268 if (stat(custom_cwd, &st) < 0 || !(st.st_mode & S_IFDIR)) {
269 fprintf(stderr, "error: %s: not a directory\n", optarg);
270 goto err;
271 }
272 break;
273 }
275 case 'w': {
276 unsigned width, height;
277 if (sscanf(optarg, "%ux%u", &width, &height) != 2 || width == 0 || height == 0) {
278 fprintf(stderr, "error: invalid window-size-pixels: %s\n", optarg);
279 goto err;
280 }
282 snprintf(buf, sizeof(buf), "initial-window-size-pixels=%ux%u", width, height);
283 if (!push_string(&overrides, buf, &total_len))
284 goto err;
285 break;
286 }
288 case 'W': {
289 unsigned width, height;
290 if (sscanf(optarg, "%ux%u", &width, &height) != 2 || width == 0 || height == 0) {
291 fprintf(stderr, "error: invalid window-size-chars: %s\n", optarg);
292 goto err;
293 }
295 snprintf(buf, sizeof(buf), "initial-window-size-chars=%ux%u", width, height);
296 if (!push_string(&overrides, buf, &total_len))
297 goto err;
298 break;
299 }
301 case 'm':
302 if (!push_string(&overrides, "initial-window-mode=maximized", &total_len))
303 goto err;
304 break;
306 case 'F':
307 if (!push_string(&overrides, "initial-window-mode=fullscreen", &total_len))
308 goto err;
309 break;
311 case 's':
312 server_socket_path = optarg;
313 break;
315 case 'H':
316 hold = true;
317 break;
319 case 'N':
320 no_wait = true;
321 break;
323 case 'o':
324 if (!push_string(&overrides, optarg, &total_len))
325 goto err;
326 break;
328 case 'E':
329 client_environment = true;
330 break;
332 case 'd': {
333 int lvl = log_level_from_string(optarg);
334 if (unlikely(lvl < 0)) {
335 fprintf(
336 stderr,
337 "-d,--log-level: %s: argument must be one of %s\n",
338 optarg,
339 log_level_string_hint());
340 goto err;
341 }
342 log_level = lvl;
343 break;
344 }
346 case 'l':
347 if (optarg == NULL || streq(optarg, "auto"))
348 log_colorize = LOG_COLORIZE_AUTO;
349 else if (streq(optarg, "never"))
350 log_colorize = LOG_COLORIZE_NEVER;
351 else if (streq(optarg, "always"))
352 log_colorize = LOG_COLORIZE_ALWAYS;
353 else {
354 fprintf(stderr, "%s: argument must be one of 'never', 'always' or 'auto'\n", optarg);
355 goto err;
356 }
357 break;
359 case 'v':
360 print_version_and_features("footclient ");
361 ret = EXIT_SUCCESS;
362 goto err;
364 case 'h':
365 print_usage(prog_name);
366 ret = EXIT_SUCCESS;
367 goto err;
369 case 'e':
370 break;
372 case '?':
373 goto err;
374 }
375 }
377 if (argc > 0) {
378 argc -= optind;
379 argv += optind;
380 }
382 log_init(log_colorize, false, LOG_FACILITY_USER, log_level);
384 fd = socket(AF_UNIX, SOCK_STREAM, 0);
385 if (fd == -1) {
386 LOG_ERRNO("failed to create socket");
387 goto err;
388 }
390 struct sockaddr_un addr = {.sun_family = AF_UNIX};
392 if (server_socket_path != NULL) {
393 strncpy(addr.sun_path, server_socket_path, sizeof(addr.sun_path) - 1);
394 if (connect(fd, (const struct sockaddr *)&addr, sizeof(addr)) < 0) {
395 LOG_ERR("%s: failed to connect (is 'foot --server' running?)", server_socket_path);
396 goto err;
397 }
398 } else {
399 bool connected = false;
401 const char *xdg_runtime = getenv("XDG_RUNTIME_DIR");
402 if (xdg_runtime != NULL) {
403 const char *wayland_display = getenv("WAYLAND_DISPLAY");
404 if (wayland_display != NULL) {
405 snprintf(addr.sun_path, sizeof(addr.sun_path),
406 "%s/foot-%s.sock", xdg_runtime, wayland_display);
407 connected = (connect(fd, (const struct sockaddr *)&addr, sizeof(addr)) == 0);
408 }
409 if (!connected) {
410 LOG_WARN("%s: failed to connect, will now try %s/foot.sock",
411 addr.sun_path, xdg_runtime);
412 snprintf(addr.sun_path, sizeof(addr.sun_path),
413 "%s/foot.sock", xdg_runtime);
414 connected = (connect(fd, (const struct sockaddr *)&addr, sizeof(addr)) == 0);
415 }
416 if (!connected)
417 LOG_WARN("%s: failed to connect, will now try /tmp/foot.sock", addr.sun_path);
418 }
420 if (!connected) {
421 strncpy(addr.sun_path, "/tmp/foot.sock", sizeof(addr.sun_path) - 1);
422 if (connect(fd, (const struct sockaddr *)&addr, sizeof(addr)) < 0) {
423 LOG_ERRNO("failed to connect (is 'foot --server' running?)");
424 goto err;
425 }
426 }
427 }
429 const char *cwd = custom_cwd;
430 if (cwd == NULL) {
431 size_t buf_len = 1024;
432 do {
433 _cwd = xrealloc(_cwd, buf_len);
434 errno = 0;
435 if (getcwd(_cwd, buf_len) == NULL && errno != ERANGE) {
436 LOG_ERRNO("failed to get current working directory");
437 goto err;
438 }
439 buf_len *= 2;
440 } while (errno == ERANGE);
441 cwd = _cwd;
442 }
444 const char *pwd = getenv("PWD");
445 if (pwd != NULL) {
446 char *resolved_path_cwd = realpath(cwd, NULL);
447 char *resolved_path_pwd = realpath(pwd, NULL);
449 if (resolved_path_cwd != NULL &&
450 resolved_path_pwd != NULL &&
451 streq(resolved_path_cwd, resolved_path_pwd))
452 {
453 /*
454 * The resolved path of $PWD matches the resolved path of
455 * the *actual* working directory - use $PWD.
456 *
457 * This makes a difference when $PWD refers to a symlink.
458 */
459 cwd = pwd;
460 }
462 free(resolved_path_cwd);
463 free(resolved_path_pwd);
464 }
466 if (client_environment) {
467 for (char **e = environ; *e != NULL; e++) {
468 if (!push_string(&envp, *e, &total_len))
469 goto err;
470 }
471 }
473 /* String lengths, including NULL terminator */
474 const size_t cwd_len = strlen(cwd) + 1;
475 const size_t override_count = tll_length(overrides);
476 const size_t env_count = tll_length(envp);
478 const struct client_data data = {
479 .hold = hold,
480 .no_wait = no_wait,
481 .xdga_token = xdga_token,
482 .token_len = token_len,
483 .cwd_len = cwd_len,
484 .override_count = override_count,
485 .argc = argc,
486 .env_count = env_count,
487 };
489 /* Total packet length, not (yet) including argv[] */
490 total_len += sizeof(data) + cwd_len + token_len;
492 /* Add argv[] size to total packet length */
493 cargv = xmalloc(argc * sizeof(cargv[0]));
494 for (size_t i = 0; i < argc; i++) {
495 const size_t arg_len = strlen(argv[i]) + 1;
497 if (arg_len >= 1 << (8 * sizeof(cargv[i].len))) {
498 LOG_ERR("argv length overflow");
499 goto err;
500 }
502 cargv[i].len = arg_len;
503 total_len += sizeof(cargv[i]) + cargv[i].len;
504 }
506 /* Check for size overflows */
507 if (total_len >= 1llu << (8 * sizeof(uint32_t)) ||
508 cwd_len >= 1 << (8 * sizeof(data.cwd_len)) ||
509 token_len >= 1 << (8 * sizeof(data.token_len)) ||
510 override_count > (size_t)(unsigned int)data.override_count ||
511 argc > (int)(unsigned int)data.argc ||
512 env_count > (size_t)(unsigned int)data.env_count)
513 {
514 LOG_ERR("size overflow");
515 goto err;
516 }
518 /* Send everything except argv[] */
519 if (sendall(fd, &(uint32_t){total_len}, sizeof(uint32_t)) < 0 ||
520 sendall(fd, &data, sizeof(data)) < 0 ||
521 sendall(fd, cwd, cwd_len) < 0)
522 {
523 LOG_ERRNO("failed to send setup packet to server");
524 goto err;
525 }
527 /* Send XDGA token, if we have one */
528 if (xdga_token) {
529 if (sendall(fd, token, token_len) != token_len)
530 {
531 LOG_ERRNO("failed to send xdg activation token to server");
532 goto err;
533 }
534 }
536 /* Send overrides */
537 if (!send_string_list(fd, &overrides))
538 goto err;
540 /* Send argv[] */
541 for (size_t i = 0; i < argc; i++) {
542 if (sendall(fd, &cargv[i], sizeof(cargv[i])) < 0 ||
543 sendall(fd, argv[i], cargv[i].len) < 0)
544 {
545 LOG_ERRNO("failed to send setup packet (argv) to server");
546 goto err;
547 }
548 }
550 /* Send environment */
551 if (!send_string_list(fd, &envp))
552 goto err;
554 struct sigaction sa_int = {.sa_handler = &sigint_handler};
555 struct sigaction sa_usr = {.sa_handler = &sigusr_handler};
556 sigemptyset(&sa_int.sa_mask);
557 sigemptyset(&sa_usr.sa_mask);
559 if (sigaction(SIGINT, &sa_int, NULL) < 0 ||
560 sigaction(SIGTERM, &sa_int, NULL) < 0 ||
561 sigaction(SIGUSR1, &sa_usr, NULL) < 0 ||
562 sigaction(SIGUSR2, &sa_usr, NULL) < 0)
563 {
564 LOG_ERRNO("failed to register signal handlers");
565 goto err;
566 }
568 int exit_code;
569 ssize_t rcvd = -1;
571 while (true) {
572 rcvd = recv(fd, &exit_code, sizeof(exit_code), 0);
574 const int got_sigusr = sigusr;
575 sigusr = 0;
577 if (rcvd < 0 && errno == EINTR) {
578 if (aborted)
579 break;
580 else if (got_sigusr != 0) {
581 LOG_DBG("sending sigusr %d to server", got_sigusr);
583 struct {
584 struct client_ipc_hdr hdr;
585 struct client_ipc_sigusr sigusr;
586 } ipc = {
587 .hdr = {
588 .ipc_code = FOOT_IPC_SIGUSR,
589 .size = sizeof(struct client_ipc_sigusr),
590 },
591 .sigusr = {
592 .signo = got_sigusr,
593 },
594 };
596 ssize_t count = send(fd, &ipc, sizeof(ipc), 0);
597 if (count < 0) {
598 LOG_ERRNO("failed to send SIGUSR IPC to server");
599 goto err;
600 } else if ((size_t)count != sizeof(ipc)) {
601 LOG_ERR("failed to send SIGUSR IPC to server");
602 goto err;
603 }
604 }
606 continue;
607 }
609 break;
610 }
612 if (rcvd == -1 && errno == EINTR)
613 xassert(aborted);
614 else if (rcvd != sizeof(exit_code))
615 LOG_ERRNO("failed to read server response");
616 else
617 ret = exit_code;
619err:
620 free_string_list(&envp);
621 free_string_list(&overrides);
622 free(cargv);
623 free(_cwd);
624 free(custom_cwd);
625 if (fd != -1)
626 close(fd);
627 log_deinit();
628 return ret;
Diagnostics5 git calls · 523 ms
CallStatusSizeTime0523 ms
discover200178 B3 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=3
git.response.bytes=178
git.server.agent=git/2.56.1-Linux
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch server-option object-format
git.server.fetch=shallow wait-for-done filter
git.protocol.version=2
git.pkt.frames=9
git.pkt.data=7
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=178
git.pkt.payload.max=35
ls-refs20010 KiB483 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=411
git.response.bytes=10322
git.response.cache=EXPIRED
git.response.duration_ms=480
git.protocol.version=2
git.pkt.frames=108
git.pkt.data=107
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=10322
git.pkt.payload.max=106
git.ls_refs.count=107
git.ls_refs.head=refs/heads/master
fetchtree:0 · deepen 102009.3 KiB · hit3 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=3
git.response.bytes=9489
git.response.cache=HIT
git.response.duration_ms=3
git.fetch.filter=tree:0
git.fetch.wants=c0d2c3e95d74cb60526ff28aec9f34ee3df545e0
git.fetch.haves.count=0
git.fetch.deepen=10
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=7
git.pkt.data=5
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=9489
git.pkt.payload.max=9389
git.sideband.band1.bytes=9389
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=10
git.pack.bytes=9389
git.pack.ofs_delta=0
git.pack.ref_delta=0
git.pack.chain.max=0
git.pack.trailer=de930681b6073ba5b599a0f956bfbd114762ad5a
git.pack.full=10
Open pack map
fetchtree:02003.6 KiB · hit8 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=8
git.response.bytes=3708
git.response.cache=HIT
git.response.duration_ms=8
git.fetch.filter=tree:0
git.fetch.wants=96f1228f4004ebd74530c7f0aea264108eff425f
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=4
git.pkt.data=3
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=3708
git.pkt.payload.max=3681
git.sideband.band1.bytes=3681
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=1
git.pack.bytes=3681
git.pack.trailer=731a22f61f25bdfdca1691647f2056631bcfdcf1
Open pack map
fetch2005.1 KiB · hit29 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=29
git.response.bytes=5185
git.response.cache=HIT
git.response.duration_ms=29
git.fetch.wants=ab56d720e421cfec4538c5ff58ee4fa22da406c5
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=4
git.pkt.data=3
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=5185
git.pkt.payload.max=5158
git.sideband.band1.bytes=5158
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0

Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.

Remote
https://codeberg.org/dnkl/foot
Ref
refs/heads/master
Commit
c0d2c3e95d74cb60526ff28aec9f34ee3df545e0
cf-ray
a5e1e9b1591b452a
Request
85bf16d2…
Protocol
v2 · sha1
Agent
git/2.56.1-Linux
Filter
advertised
Fetch
shallow wait-for-done filter
Capabilities
agent ls-refs fetch server-option object-format