C# Класс Git.Core.ObjectStore

This class has all the information about the object store tipicaly .git/objects
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

Checkin() публичный Метод

Checkin a single object by using its path
public Checkin ( string path ) : void
path string /// A ///
Результат void

Checkout() публичный Метод

Get a commit and from there start the checkout
public Checkout ( string baseDir, Commit commit ) : void
baseDir string
commit Commit /// A ///
Результат void

Checkout() публичный Метод

Get a tree and create the structure from there
public Checkout ( string baseDir, Tree tree ) : void
baseDir string
tree Tree /// A ///
Результат void

Compress() публичный статический Метод

Compress a byte array
public static Compress ( byte data ) : byte[]
data byte /// A data byte array ///
Результат byte[]

Decompress() публичный статический Метод

Decompress a byte array
public static Decompress ( byte data ) : byte[]
data byte /// A data byte array ///
Результат byte[]

Get() публичный Метод

public Get ( SHA1 key ) : Object
key SHA1
Результат Object

Get() публичный Метод

public Get ( string hexstring ) : Object
hexstring string
Результат Object

LsTree() публичный Метод

public LsTree ( string hexstring ) : void
hexstring string
Результат void

ObjectStore() публичный Метод

public ObjectStore ( string path ) : System
path string
Результат System

Write() публичный Метод

This method write the queue content to the filesystem
public Write ( ) : void
Результат void