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