Namespaces

Types in GitSharp

Type Change

Namespace GitSharp

Represents a change of a single file between two commits. Use Commit.Diff to get a list of Change objects.

Properties

Public properties

AbstractObject ChangedObject get;

The file (i.e. Blob) this Change is according to. Always returns a non-null revision of the file, no matter what kind of change. It normally returns the ComparedCommit's version of the changed object except for ChangeType.Removed where it returns the ReferenceCommit's version of the object. This property is designed to release the calling code from null checking and revision selection and may be especially useful for GUI bindings.

ChangeType ChangeType get; set;

The kind of change (Added, Modified, Deleted, etc. )

Commit[] Commits get;

Returns ReferenceCommit and ComparedCommit as array

Commit ComparedCommit get; set;

The commit which is compared against the ReferenceCommit.

AbstractObject ComparedObject get; set;

The revision of the file from the ComparedCommit. It may be null in some cases i.e. for ChangeType.Removed

int ComparedPermissions get; set;

Unix file permissions of the ComparedCommit's version of the object

string Name get; set;

The filename of the ChangedObject

AbstractObject[] Objects get;

Returns ReferenceObject and ComparedObject as array

string Path get; set;

The filepath of the ChangedObject

Int32[] Permissions get;

Returns ReferenceObject's and ComparedObject's permissions as array

Commit ReferenceCommit get; set;

The commit that serves as reference for this comparison. The change reflects the difference of the other commit against this ReferenceCommit.

AbstractObject ReferenceObject get; set;

The revision of the file from the ReferenceCommit. It may be null in some cases i.e. for ChangeType.Added

int ReferencePermissions get; set;

Unix file permissions of the ReferenceCommit's version of the object