C# Class GitSharp.Core.RefDatabase

Mostrar archivo Open project: stschake/GitSharp Class Usage Examples

Public Methods

Method Description
ClearCache ( ) : void
Create ( ) : void
GetAllRefs ( ) : Ref>.Dictionary

Gets all known refs (heads, tags, remotes).

GetBranches ( ) : Ref>.Dictionary
GetRemotes ( ) : Ref>.Dictionary
GetTags ( ) : Ref>.Dictionary

Gets all tags; key is short tag name ("v1.0") and value of the entry contains the ref with the full tag name ("refs/tags/v1.0").

IdOf ( string name ) : ObjectId
Link ( string name, string target ) : void

Writes a symref (e.g. HEAD) to disk * @param name

NewRename ( string fromRef, string toRef ) : GitSharp.Core.RefRename

An set of update operations for renaming a ref

NewUpdate ( string name ) : RefUpdate

Create a command to update, create or delete a ref in this repository.

NewUpdate ( string name, bool detach ) : RefUpdate

Create a command to update, create or delete a ref in this repository.

ReadRef ( string partialName ) : Ref
RefDatabase ( Repository repo ) : System
RemovePackedRef ( String name ) : void

Private Methods

Method Description
FileForRef ( string name ) : FileInfo
LockAndWriteFile ( FileInfo file, byte content ) : void
OpenReader ( FileSystemInfo file ) : StreamReader
Peel ( Ref dref ) : Ref

Returns the object that this object points to if this is a commit.

ReadLine ( FileInfo file ) : string
ReadLooseRefs ( Ref>.IDictionary avail, string prefix, DirectoryInfo dir ) : void
ReadPackedRefs ( Ref>.ICollection avail ) : void
ReadRefBasic ( String origName, string name, int depth ) : Ref
ReadRefBasic ( string name, int depth ) : Ref
ReadRefs ( ) : Ref>.Dictionary
RefreshPackedRefs ( ) : void
SetModified ( ) : void
Stored ( string origName, string name, ObjectId id, System.DateTime time ) : void
UncacheRef ( string name ) : void
UncacheSymRef ( string name ) : void
WritePackedRefs ( ) : void

Method Details

ClearCache() public method

public ClearCache ( ) : void
return void

Create() public method

public Create ( ) : void
return void

GetAllRefs() public method

Gets all known refs (heads, tags, remotes).
public GetAllRefs ( ) : Ref>.Dictionary
return Ref>.Dictionary

GetBranches() public method

public GetBranches ( ) : Ref>.Dictionary
return Ref>.Dictionary

GetRemotes() public method

public GetRemotes ( ) : Ref>.Dictionary
return Ref>.Dictionary

GetTags() public method

Gets all tags; key is short tag name ("v1.0") and value of the entry contains the ref with the full tag name ("refs/tags/v1.0").
public GetTags ( ) : Ref>.Dictionary
return Ref>.Dictionary

IdOf() public method

public IdOf ( string name ) : ObjectId
name string
return ObjectId

Link() public method

Writes a symref (e.g. HEAD) to disk * @param name
public Link ( string name, string target ) : void
name string symref name
target string pointed to ref
return void

NewRename() public method

An set of update operations for renaming a ref
public NewRename ( string fromRef, string toRef ) : GitSharp.Core.RefRename
fromRef string Old ref name
toRef string New ref name
return GitSharp.Core.RefRename

NewUpdate() public method

Create a command to update, create or delete a ref in this repository.
/// A symbolic ref was passed in and could not be resolved back /// to the base ref, as the symbolic ref could not be read. ///
public NewUpdate ( string name ) : RefUpdate
name string /// name of the ref the caller wants to modify. ///
return RefUpdate

NewUpdate() public method

Create a command to update, create or delete a ref in this repository.
public NewUpdate ( string name, bool detach ) : RefUpdate
name string name of the ref the caller wants to modify.
detach bool true to detach the ref, i.e. replace symref with object ref
return RefUpdate

ReadRef() public method

public ReadRef ( string partialName ) : Ref
partialName string
return Ref

RefDatabase() public method

public RefDatabase ( Repository repo ) : System
repo Repository
return System

RemovePackedRef() public method

public RemovePackedRef ( String name ) : void
name String
return void