Method

GgitRepositoryget_ahead_behind

Declaration [src]

void
ggit_repository_get_ahead_behind (
  GgitRepository* repository,
  GgitOId* local,
  GgitOId* upstream,
  gsize* ahead,
  gsize* behind,
  GError** error
)

Description [src]

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.

Parameters

local GgitOId
 

The commit for local.

 The data is owned by the caller of the function.
upstream GgitOId
 

The commit for upstream.

 The data is owned by the caller of the function.
ahead gsize*
 

Number of unique from commits in upstream.

 The argument will be set by the function.
behind gsize*
 

Number of unique from commits in local.

 The argument will be set by the function.
error GError **
  The return location for a GError*, or NULL.