Sha256: 214189a27197e21ce36efc6904ac31367db519443d8886a8dbcfe307e7e3994e

Contents?: true

Size: 1.6 KB

Versions: 60

Compression:

Stored size: 1.6 KB

Contents

/*
 * 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.
 */
#ifndef INCLUDE_git_graph_h__
#define INCLUDE_git_graph_h__

#include "common.h"
#include "types.h"
#include "oid.h"

/**
 * @file git2/graph.h
 * @brief Git graph traversal routines
 * @defgroup git_revwalk Git graph traversal routines
 * @ingroup Git
 * @{
 */
GIT_BEGIN_DECL

/**
 * 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.
 *
 * @param ahead number of unique from commits in `upstream`
 * @param behind number of unique from commits in `local`
 * @param repo the repository where the commits exist
 * @param local the commit for local
 * @param upstream the commit for upstream
 */
GIT_EXTERN(int) git_graph_ahead_behind(size_t *ahead, size_t *behind, git_repository *repo, const git_oid *local, const git_oid *upstream);


/**
 * Determine if a commit is the descendant of another commit.
 *
 * @param commit a previously loaded commit.
 * @param ancestor a potential ancestor commit.
 * @return 1 if the given commit is a descendant of the potential ancestor,
 * 0 if not, error code otherwise.
 */
GIT_EXTERN(int) git_graph_descendant_of(
	git_repository *repo,
	const git_oid *commit,
	const git_oid *ancestor);

/** @} */
GIT_END_DECL
#endif

Version data entries

60 entries across 60 versions & 1 rubygems

Version Path
rugged-0.26.7 vendor/libgit2/include/git2/graph.h
rugged-0.26.6 vendor/libgit2/include/git2/graph.h
rugged-0.26.3 vendor/libgit2/include/git2/graph.h
rugged-0.26.0 vendor/libgit2/include/git2/graph.h
rugged-0.26.0b5 vendor/libgit2/include/git2/graph.h
rugged-0.26.0b4 vendor/libgit2/include/git2/graph.h
rugged-0.26.0b3 vendor/libgit2/include/git2/graph.h
rugged-0.26.0b2 vendor/libgit2/include/git2/graph.h
rugged-0.26.0b1 vendor/libgit2/include/git2/graph.h
rugged-0.25.1.1 vendor/libgit2/include/git2/graph.h
rugged-0.24.6.1 vendor/libgit2/include/git2/graph.h
rugged-0.25.1 vendor/libgit2/include/git2/graph.h
rugged-0.24.5 vendor/libgit2/include/git2/graph.h
rugged-0.25.0 vendor/libgit2/include/git2/graph.h
rugged-0.25.0b10 vendor/libgit2/include/git2/graph.h
rugged-0.25.0b9 vendor/libgit2/include/git2/graph.h
rugged-0.25.0b8 vendor/libgit2/include/git2/graph.h
rugged-0.25.0b7 vendor/libgit2/include/git2/graph.h
rugged-0.25.0b6 vendor/libgit2/include/git2/graph.h
rugged-0.25.0b5 vendor/libgit2/include/git2/graph.h