Blame


1 372ccdbb 2018-06-10 stsp /*
2 372ccdbb 2018-06-10 stsp * Copyright (c) 2018 Stefan Sperling <stsp@openbsd.org>
3 372ccdbb 2018-06-10 stsp *
4 372ccdbb 2018-06-10 stsp * Permission to use, copy, modify, and distribute this software for any
5 372ccdbb 2018-06-10 stsp * purpose with or without fee is hereby granted, provided that the above
6 372ccdbb 2018-06-10 stsp * copyright notice and this permission notice appear in all copies.
7 372ccdbb 2018-06-10 stsp *
8 372ccdbb 2018-06-10 stsp * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 372ccdbb 2018-06-10 stsp * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 372ccdbb 2018-06-10 stsp * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 372ccdbb 2018-06-10 stsp * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 372ccdbb 2018-06-10 stsp * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 372ccdbb 2018-06-10 stsp * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 372ccdbb 2018-06-10 stsp * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 372ccdbb 2018-06-10 stsp */
16 372ccdbb 2018-06-10 stsp
17 372ccdbb 2018-06-10 stsp struct got_commit_graph;
18 372ccdbb 2018-06-10 stsp
19 372ccdbb 2018-06-10 stsp const struct got_error *got_commit_graph_open(struct got_commit_graph **,
20 31cedeaf 2018-09-15 stsp struct got_object_id *commit_id, const char *, int,
21 31cedeaf 2018-09-15 stsp struct got_repository *repo);
22 372ccdbb 2018-06-10 stsp void got_commit_graph_close(struct got_commit_graph *);
23 372ccdbb 2018-06-10 stsp
24 6c34b1aa 2019-03-18 stsp const struct got_error *got_commit_graph_fetch_commits(
25 6c34b1aa 2019-03-18 stsp struct got_commit_graph *, int, struct got_repository *);
26 372ccdbb 2018-06-10 stsp const struct got_error *got_commit_graph_iter_start(
27 31cedeaf 2018-09-15 stsp struct got_commit_graph *, struct got_object_id *, struct got_repository *);
28 b43fbaa0 2018-06-11 stsp const struct got_error *got_commit_graph_iter_next(struct got_object_id **,
29 b43fbaa0 2018-06-11 stsp struct got_commit_graph *);
30 be7061eb 2018-12-30 stsp const struct got_error *got_commit_graph_intersect(struct got_object_id **,
31 be7061eb 2018-12-30 stsp struct got_commit_graph *, struct got_commit_graph *,
32 be7061eb 2018-12-30 stsp struct got_repository *);
33 a9833bc9 2019-05-13 stsp
34 a9833bc9 2019-05-13 stsp /* Find the youngest common ancestor of two commits. */
35 a9833bc9 2019-05-13 stsp const struct got_error *got_commit_graph_find_youngest_common_ancestor(
36 a9833bc9 2019-05-13 stsp struct got_object_id **, struct got_object_id *, struct got_object_id *,
37 a9833bc9 2019-05-13 stsp struct got_repository *);