config_entries.h 1.09 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
/*
 * Copyright (C) the libgit2 contributors. All rights reserved.
 *
 * This file is part of libgit2, distributed under the GNU GPL v2 with
 * a Linking Exception. For full terms see the included COPYING file.
 */

#include "common.h"

#include "git2/sys/config.h"
#include "config.h"

13
typedef struct git_config_entries git_config_entries;
14

15
int git_config_entries_new(git_config_entries **out);
16
int git_config_entries_dup(git_config_entries **out, git_config_entries *entries);
17
int git_config_entries_dup_entry(git_config_entries *entries, const git_config_entry *entry);
18
void git_config_entries_incref(git_config_entries *entries);
19
void git_config_entries_free(git_config_entries *entries);
20
/* Add or append the new config option */
21
int git_config_entries_append(git_config_entries *entries, git_config_entry *entry);
22 23
int git_config_entries_get(git_config_entry **out, git_config_entries *entries, const char *key);
int git_config_entries_get_unique(git_config_entry **out, git_config_entries *entries, const char *key);
24
int git_config_entries_iterator_new(git_config_iterator **out, git_config_entries *entries);