Summary
Provides high-level read access to a Git repository, exposing the objects and queries needed for version calculation.
- Assembly
- GitVersion
.Core .dll - Namespace
- GitVersion
graph BT
Type["IRepositoryStore"]
class Type type-node
Syntax
public interface IRepositoryStore
Attributes
| Type | Description |
|---|---|
| Nullable |
Properties
| Name | Value | Summary |
|---|---|---|
| Branches | IBranchCollection |
Gets the collection of all branches in the repository.
|
| Head | IBranch |
Gets the currently checked-out branch.
|
| Tags | ITagCollection |
Gets the collection of all tags in the repository.
|
| Uncommitted |
int |
Gets the number of files that have been modified but not yet committed.
|
Methods
| Name | Value | Summary |
|---|---|---|
| ExcludingBranches |
IEnumerable |
Returns all branches except those in branchesToExclude.
|
| FindBranch |
IBranch |
Finds and returns the branch with the given branchName, or
null if not found. |
| Find |
IEnumerable |
Returns the commits and their originating branches that branched from branch, excluding excludedBranches.
|
| FindMergeBase |
ICommit |
Find the merge base of the two branches, i.e. the best common ancestor of the two branches' tips.
|
| FindMergeBase |
ICommit |
Finds the best common ancestor between commit and mainlineTip.
|
| Get |
IEnumerable |
Returns branches that contain the given commit in their history.
|
| GetCommitLog |
IReadOnlyList |
Returns the commits reachable between baseVersionSource and currentCommit, respecting ignore rules.
|
| Get |
IReadOnlyList |
Returns all commits reachable from commit that are also on branch.
|
| Get |
IReadOnlyList |
Returns all commits reachable from the HEAD commit, respecting ignore rules.
|
| GetCurrentCommit |
ICommit |
Returns the commit that should be treated as the current HEAD for version calculation, applying ignore rules.
|
| GetForwardMerge |
ICommit |
Returns the commit that represents a forward merge from commitToFindCommonBase relative to findMergeBase.
|
| GetSourceBranches |
IEnumerable |
Returns the branches that branch was directly branched from, excluding excludedBranches.
|
| GetSourceBranches |
IEnumerable |
Returns the branches that branch was directly branched from, excluding the given collection of branches.
|
| GetTargetBranch |
IBranch |
Resolves and returns the branch that matches targetBranchName, creating a local branch if necessary.
|
| IsCommitOnBranch |
bool |
Returns
true if baseVersionSource is an ancestor of firstMatchingCommit on branch. |
Extension Methods
| Name | Value | Summary |
|---|---|---|
| NotNull |
T |
Throws
System.ArgumentNullException when value is null; otherwise returns the value.From CommonExtensions
|