Class Index
An index is a map of paths in the repository to object contents. The repository has an index which acts as the staging area for changes to be committed and a cache of in-working tree files.
Implements
Inherited Members
Namespace: Dogged
Assembly: Dogged.dll
Syntax
public class Index : NativeDisposable
Properties
| Improve this Doc View SourceCount
Gets the number of entries in the index.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Item[Int32]
Gets the index entry at the specified index.
Declaration
public IndexEntry this[int position] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | position |
Property Value
Type | Description |
---|---|
IndexEntry |
Item[String]
Gets the index entry at the specified path.
Declaration
public IndexEntry this[string path] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.String | path |
Property Value
Type | Description |
---|---|
IndexEntry |
Item[String, Int32]
Gets the index entry at the specified path and at the given stage level.
A "stage level" is a construct for handling conflicted files during a merge; generally, files are in stage level 0 (sometimes called the "main index"); if a file is in conflict after a merge, there will be no entry at stage level 0, instead there will be entries at stages 1-3 representing the conflicting contents of the common ancestor, the file in "our" branch and the file in "their" branch.
Declaration
public IndexEntry this[string path, int stage] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.String | path | |
System.Int32 | stage |
Property Value
Type | Description |
---|---|
IndexEntry |
Methods
| Improve this Doc View SourceGetEnumerator()
Returns an enumerate that iterates through index entries. This will iterate over a snapshot of the index, so the underlying index can safely be mutated during iteration.
Declaration
public IEnumerator<IndexEntry> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<IndexEntry> | An enumerator of IndexEntry objects |