{"size": 875, "ext": "scrbl", "max_stars_repo_path": "libgit2/scribblings/graph.scrbl", "max_stars_repo_name": "guygastineau/libgit2", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "libgit2/scribblings/graph.scrbl", "max_issues_repo_name": "guygastineau/libgit2", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "libgit2/scribblings/graph.scrbl", "max_forks_repo_name": "guygastineau/libgit2", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 30.1724137931, "max_line_length": 236, "alphanum_fraction": 0.6868571429}
#lang scribble/manual

@(require (for-label racket))

@title{Graph}

@defmodule[libgit2/include/graph]


@defproc[(git_graph_ahead_behind
          [repo repository?]
          [local oid?]
          [upstream oid?])
         any]{
 Count the number of unique commits between two commit objects

 There is no need for branches containing the commits to have any upstream relationship, but it helps to think of one as a branch and the other as its upstream, the ahead and behind values will be what git would report for the branches.

 Returns @racket[(values (ahead : integer?) (behind : integer?))]. See @secref["values" #:doc '(lib "scribblings/reference/reference.scrbl")]
}

@defproc[(git_graph_descendant_of
          [repo repository?]
          [commit oid?]
          [ancestor oid?])
         boolean?]{
 Determine if a commit is the descendant of another commit.
}
