Blame


1 d65a88a2 2021-09-05 stsp /*
2 d65a88a2 2021-09-05 stsp * Copyright (c) 2019 Ori Bernstein <ori@openbsd.org>
3 d65a88a2 2021-09-05 stsp * Copyright (c) 2021 Stefan Sperling <stsp@openbsd.org>
4 d65a88a2 2021-09-05 stsp *
5 d65a88a2 2021-09-05 stsp * Permission to use, copy, modify, and distribute this software for any
6 d65a88a2 2021-09-05 stsp * purpose with or without fee is hereby granted, provided that the above
7 d65a88a2 2021-09-05 stsp * copyright notice and this permission notice appear in all copies.
8 d65a88a2 2021-09-05 stsp *
9 d65a88a2 2021-09-05 stsp * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 d65a88a2 2021-09-05 stsp * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 d65a88a2 2021-09-05 stsp * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 d65a88a2 2021-09-05 stsp * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 d65a88a2 2021-09-05 stsp * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 d65a88a2 2021-09-05 stsp * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 d65a88a2 2021-09-05 stsp * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 d65a88a2 2021-09-05 stsp */
17 d65a88a2 2021-09-05 stsp
18 1eb38992 2023-04-14 stsp #define GOT_DIAL_CMD_SEND "git-receive-pack"
19 1eb38992 2023-04-14 stsp #define GOT_DIAL_CMD_FETCH "git-upload-pack"
20 d65a88a2 2021-09-05 stsp
21 d65a88a2 2021-09-05 stsp const struct got_error *got_dial_git(int *newfd, const char *host,
22 1eb38992 2023-04-14 stsp const char *port, const char *path, const char *command);
23 d65a88a2 2021-09-05 stsp
24 d65a88a2 2021-09-05 stsp const struct got_error *got_dial_ssh(pid_t *newpid, int *newfd,
25 d65a88a2 2021-09-05 stsp const char *host, const char *port, const char *path,
26 1eb38992 2023-04-14 stsp const char *command, int verbosity);
27 1eb38992 2023-04-14 stsp
28 1eb38992 2023-04-14 stsp const struct got_error *got_dial_parse_command(char **command,
29 1eb38992 2023-04-14 stsp char **repo_path, const char *gitcmd);