Blame


1 7b19e0f1 2017-11-05 stsp /*
2 0c9bd0c5 2018-02-12 stsp * Copyright (c) 2018 Stefan Sperling <stsp@openbsd.org>
3 7b19e0f1 2017-11-05 stsp *
4 7b19e0f1 2017-11-05 stsp * Permission to use, copy, modify, and distribute this software for any
5 7b19e0f1 2017-11-05 stsp * purpose with or without fee is hereby granted, provided that the above
6 7b19e0f1 2017-11-05 stsp * copyright notice and this permission notice appear in all copies.
7 7b19e0f1 2017-11-05 stsp *
8 7b19e0f1 2017-11-05 stsp * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 7b19e0f1 2017-11-05 stsp * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 7b19e0f1 2017-11-05 stsp * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 7b19e0f1 2017-11-05 stsp * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 7b19e0f1 2017-11-05 stsp * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 7b19e0f1 2017-11-05 stsp * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 7b19e0f1 2017-11-05 stsp * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 7b19e0f1 2017-11-05 stsp */
16 7b19e0f1 2017-11-05 stsp
17 4027f31a 2017-11-04 stsp /* A reference which points to an arbitrary object. */
18 0c9bd0c5 2018-02-12 stsp struct got_reference;
19 4027f31a 2017-11-04 stsp
20 4027f31a 2017-11-04 stsp /* Well-known reference names. */
21 4027f31a 2017-11-04 stsp #define GOT_REF_HEAD "HEAD"
22 4027f31a 2017-11-04 stsp #define GOT_REF_ORIG_HEAD "ORIG_HEAD"
23 4027f31a 2017-11-04 stsp #define GOT_REF_MERGE_HEAD "MERGE_HEAD"
24 4df642d9 2017-11-05 stsp #define GOT_REF_FETCH_HEAD "FETCH_HEAD"
25 4027f31a 2017-11-04 stsp
26 11995603 2017-11-05 stsp struct got_repository;
27 11995603 2017-11-05 stsp struct got_object_id;
28 4027f31a 2017-11-04 stsp
29 11995603 2017-11-05 stsp const struct got_error * got_ref_open(struct got_reference **,
30 11995603 2017-11-05 stsp struct got_repository *, const char *);
31 4027f31a 2017-11-04 stsp void got_ref_close(struct got_reference *);
32 11995603 2017-11-05 stsp struct got_reference *got_ref_dup(struct got_reference *);
33 11995603 2017-11-05 stsp const struct got_error *got_ref_resolve(struct got_object_id **,
34 11995603 2017-11-05 stsp struct got_repository *, struct got_reference *);
35 86c3caaf 2018-03-09 stsp char *got_ref_to_str(struct got_reference *);