]> git.proxmox.com Git - libgit2.git/blame - src/fetchhead.h
treebuilder: fix memory leaks in `write_with_buffer`
[libgit2.git] / src / fetchhead.h
CommitLineData
b0f6e45d 1/*
359fc2d2 2 * Copyright (C) the libgit2 contributors. All rights reserved.
b0f6e45d
ET
3 *
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
6 */
7#ifndef INCLUDE_fetchhead_h__
8#define INCLUDE_fetchhead_h__
9
10#include "vector.h"
11
06280457 12typedef struct git_fetchhead_ref {
b0f6e45d
ET
13 git_oid oid;
14 unsigned int is_merge;
15 char *ref_name;
16 char *remote_url;
06280457 17} git_fetchhead_ref;
7fcec834
ET
18
19int git_fetchhead_ref_create(
20 git_fetchhead_ref **fetchhead_ref_out,
21 git_oid *oid,
22 unsigned int is_merge,
23 const char *ref_name,
24 const char *remote_url);
b0f6e45d
ET
25
26int git_fetchhead_ref_cmp(const void *a, const void *b);
27
7fcec834 28int git_fetchhead_write(git_repository *repo, git_vector *fetchhead_refs);
b0f6e45d
ET
29
30void git_fetchhead_ref_free(git_fetchhead_ref *fetchhead_ref);
31
32#endif