C# Class LibGit2Sharp.ReferenceCollectionExtensions

Provides helper overloads to a ReferenceCollection.
Exibir arquivo Open project: nulltoken/libgit2sharp

Public Methods

Method Description
Add ( this refsColl, string name, string canonicalRefNameOrObjectish, Signature signature, string logMessage, bool allowOverwrite = false ) : System.Reference

Creates a direct or symbolic reference with the specified name and target

Add ( this refsColl, string name, string canonicalRefNameOrObjectish, bool allowOverwrite = false ) : System.Reference

Creates a direct or symbolic reference with the specified name and target

ReachableFrom ( this refsColl, IEnumerable targets ) : IEnumerable

Find the References that can reach at least one Commit in the specified targets.

ReachableFrom ( this refsColl, IEnumerable refSubset, IEnumerable targets ) : IEnumerable

Find the References among refSubset that can reach at least one Commit in the specified targets.

Remove ( this refsColl, string name ) : void

Delete a reference with the specified name

Rename ( this refsColl, string currentName, string newName, Signature signature = null, string logMessage = null, bool allowOverwrite = false ) : System.Reference

Rename an existing reference with a new name

UpdateTarget ( this refsColl, System.Reference directRef, string objectish ) : System.Reference

Updates the target of a direct reference

UpdateTarget ( this refsColl, System.Reference directRef, string objectish, Signature signature, string logMessage ) : System.Reference

Updates the target of a direct reference.

UpdateTarget ( this refsColl, string name, string canonicalRefNameOrObjectish ) : System.Reference

Updates the target of a reference

UpdateTarget ( this refsColl, string name, string canonicalRefNameOrObjectish, Signature signature, string logMessage ) : System.Reference

Updates the target of a reference

Private Methods

Method Description
Move ( this refsColl, string currentName, string newName, Signature signature = null, string logMessage = null, bool allowOverwrite = false ) : System.Reference
TryResolveReference ( System.Reference &reference, ReferenceCollection refsColl, string canonicalName ) : RefState

Method Details

Add() public static method

Creates a direct or symbolic reference with the specified name and target
public static Add ( this refsColl, string name, string canonicalRefNameOrObjectish, Signature signature, string logMessage, bool allowOverwrite = false ) : System.Reference
refsColl this The being worked with.
name string The name of the reference to create.
canonicalRefNameOrObjectish string The target which can be either the canonical name of a reference or a revparse spec.
signature Signature The identity used for updating the reflog
logMessage string The optional message to log in the when adding the
allowOverwrite bool True to allow silent overwriting a potentially existing reference, false otherwise.
return System.Reference

Add() public static method

Creates a direct or symbolic reference with the specified name and target
public static Add ( this refsColl, string name, string canonicalRefNameOrObjectish, bool allowOverwrite = false ) : System.Reference
refsColl this The being worked with.
name string The name of the reference to create.
canonicalRefNameOrObjectish string The target which can be either the canonical name of a reference or a revparse spec.
allowOverwrite bool True to allow silent overwriting a potentially existing reference, false otherwise.
return System.Reference

ReachableFrom() public static method

Find the References that can reach at least one Commit in the specified targets.
public static ReachableFrom ( this refsColl, IEnumerable targets ) : IEnumerable
refsColl this The being worked with.
targets IEnumerable The set of s that are interesting.
return IEnumerable

ReachableFrom() public static method

Find the References among refSubset that can reach at least one Commit in the specified targets.
public static ReachableFrom ( this refsColl, IEnumerable refSubset, IEnumerable targets ) : IEnumerable
refsColl this The being worked with.
refSubset IEnumerable The set of s to examine.
targets IEnumerable The set of s that are interesting.
return IEnumerable

Remove() public static method

Delete a reference with the specified name
public static Remove ( this refsColl, string name ) : void
refsColl this The being worked with.
name string The canonical name of the reference to delete.
return void

Rename() public static method

Rename an existing reference with a new name
public static Rename ( this refsColl, string currentName, string newName, Signature signature = null, string logMessage = null, bool allowOverwrite = false ) : System.Reference
refsColl this The being worked with.
currentName string The canonical name of the reference to rename.
newName string The new canonical name.
signature Signature The identity used for updating the reflog
logMessage string The optional message to log in the
allowOverwrite bool True to allow silent overwriting a potentially existing reference, false otherwise.
return System.Reference

UpdateTarget() public static method

Updates the target of a direct reference
public static UpdateTarget ( this refsColl, System.Reference directRef, string objectish ) : System.Reference
refsColl this The being worked with.
directRef System.Reference The direct reference which target should be updated.
objectish string The revparse spec of the target.
return System.Reference

UpdateTarget() public static method

Updates the target of a direct reference.
public static UpdateTarget ( this refsColl, System.Reference directRef, string objectish, Signature signature, string logMessage ) : System.Reference
refsColl this The being worked with.
directRef System.Reference The direct reference which target should be updated.
objectish string The revparse spec of the target.
signature Signature The identity used for updating the reflog
logMessage string The optional message to log in the
return System.Reference

UpdateTarget() public static method

Updates the target of a reference
public static UpdateTarget ( this refsColl, string name, string canonicalRefNameOrObjectish ) : System.Reference
refsColl this The being worked with.
name string The canonical name of the reference.
canonicalRefNameOrObjectish string The target which can be either the canonical name of a reference or a revparse spec.
return System.Reference

UpdateTarget() public static method

Updates the target of a reference
public static UpdateTarget ( this refsColl, string name, string canonicalRefNameOrObjectish, Signature signature, string logMessage ) : System.Reference
refsColl this The being worked with.
name string The canonical name of the reference.
canonicalRefNameOrObjectish string The target which can be either the canonical name of a reference or a revparse spec.
signature Signature The identity used for updating the reflog
logMessage string The optional message to log in the of the reference.
return System.Reference