2 * Copyright (c) 2022 Josh Rickmar <jrick@zettaport.com>
3 * Copyright (c) 2020, 2021 Tracey Emery <tracey@openbsd.org>
4 * Copyright (c) 2020 Stefan Sperling <stsp@openbsd.org>
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 * We maintain two different structures for fetch and send configuration
21 * settings in case they diverge in the future.
28 struct node_branch *branch;
35 struct node_branch *branch;
40 struct node_branch *next;
41 struct node_branch *tail;
46 struct node_ref *next;
47 struct node_ref *tail;
50 struct gotconfig_remote_repo {
51 TAILQ_ENTRY(gotconfig_remote_repo) entry;
57 int mirror_references;
58 int fetch_all_branches;
59 struct node_branch *branch;
60 struct node_ref *fetch_ref;
61 struct fetch_config *fetch_config;
62 struct send_config *send_config;
64 TAILQ_HEAD(gotconfig_remote_repo_list, gotconfig_remote_repo);
68 struct gotconfig_remote_repo_list remotes;
70 char *allowed_signers_file;
71 char *revoked_signers_file;
76 * Parse individual gotconfig repository files
78 const struct got_error *gotconfig_parse(struct gotconfig **, const char *,
80 void gotconfig_free(struct gotconfig *);