C# Class Git.Core.ObjectStore

This class has all the information about the object store tipicaly .git/objects
Show file Open project: igorgue/git-sharp Class Usage Examples

Public Methods

Method Description
Checkin ( string path ) : void

Checkin a single object by using its path

Checkout ( string baseDir, Commit commit ) : void

Get a commit and from there start the checkout

Checkout ( string baseDir, Tree tree ) : void

Get a tree and create the structure from there

Compress ( byte data ) : byte[]

Compress a byte array

Decompress ( byte data ) : byte[]

Decompress a byte array

Get ( SHA1 key ) : Object
Get ( string hexstring ) : Object
LsTree ( string hexstring ) : void
ObjectStore ( string path ) : System
Write ( ) : void

This method write the queue content to the filesystem

Private Methods

Method Description
AddToQueue ( Object o ) : void
AddZlibSignature ( byte data ) : byte[]

Problem: in order to compress with Zlib(C Git deflate library) we must add 2 bytes at the begining of this, those represent the type of algorithm used, it just simple extra data that just confused me for a while

CreateObjectParent ( SHA1 id ) : void

Create a object first parent... e.g. f4/47d5573b70cf042d036bfa62f55cdefccd9909 f4 is the parent we create in this method

GetObjectFullPath ( SHA1 id ) : string
LsTree ( Tree tree ) : void
ObjectExist ( SHA1 id ) : bool
PersistObject ( SHA1 id ) : void
ReadBuffer ( SHA1 id ) : byte[]
RemoveZlibSignature ( byte data ) : byte[]
RetrieveContent ( SHA1 id ) : byte[]
RetrieveObject ( SHA1 id ) : Object
WriteBuffer ( SHA1 id, byte content ) : void
WriteBuffer ( SHA1 id, byte content, bool overwrite ) : void

Method Details

Checkin() public method

Checkin a single object by using its path
public Checkin ( string path ) : void
path string /// A ///
return void

Checkout() public method

Get a commit and from there start the checkout
public Checkout ( string baseDir, Commit commit ) : void
baseDir string
commit Commit /// A ///
return void

Checkout() public method

Get a tree and create the structure from there
public Checkout ( string baseDir, Tree tree ) : void
baseDir string
tree Tree /// A ///
return void

Compress() public static method

Compress a byte array
public static Compress ( byte data ) : byte[]
data byte /// A data byte array ///
return byte[]

Decompress() public static method

Decompress a byte array
public static Decompress ( byte data ) : byte[]
data byte /// A data byte array ///
return byte[]

Get() public method

public Get ( SHA1 key ) : Object
key SHA1
return Object

Get() public method

public Get ( string hexstring ) : Object
hexstring string
return Object

LsTree() public method

public LsTree ( string hexstring ) : void
hexstring string
return void

ObjectStore() public method

public ObjectStore ( string path ) : System
path string
return System

Write() public method

This method write the queue content to the filesystem
public Write ( ) : void
return void