C# Class GitSharp.Core.ObjectWriter

ファイルを表示 Open project: jagregory/GitSharp Class Usage Examples

Public Methods

Method Description
ComputeBlobSha1 ( long length, Stream input ) : ObjectId

Compute the SHA-1 of a blob without creating an object. This is for figuring out if we already have a blob or not.

ObjectWriter ( Repository repo ) : System

Construct an object writer for the specified repository.

WriteBlob ( FileInfo fileInfo ) : ObjectId

Write a blob with the data in the specified file

WriteBlob ( byte b ) : ObjectId

Write a blob with the specified data.

WriteBlob ( long len, Stream input ) : ObjectId

Write a blob with data from a stream

WriteCanonicalTree ( byte buffer ) : ObjectId

Write a canonical tree to the object database.

WriteCommit ( Commit c ) : ObjectId

Write a Commit to the object database

WriteTag ( Tag tag ) : ObjectId

Write an annotated Tag to the object database

WriteTree ( Tree t ) : ObjectId

Private Methods

Method Description
WriteCommit ( byte b ) : ObjectId
WriteCommit ( long len, Stream input ) : ObjectId
WriteObject ( ObjectType type, long len, Stream input, bool store ) : ObjectId
WriteTag ( byte b ) : ObjectId
WriteTag ( long len, Stream input ) : ObjectId
WriteTree ( long len, Stream input ) : ObjectId

Method Details

ComputeBlobSha1() public method

Compute the SHA-1 of a blob without creating an object. This is for figuring out if we already have a blob or not.
public ComputeBlobSha1 ( long length, Stream input ) : ObjectId
length long number of bytes to consume.
input Stream stream for read blob data from.
return ObjectId

ObjectWriter() public method

Construct an object writer for the specified repository.
public ObjectWriter ( Repository repo ) : System
repo Repository
return System

WriteBlob() public method

Write a blob with the data in the specified file
public WriteBlob ( FileInfo fileInfo ) : ObjectId
fileInfo System.IO.FileInfo A file containing blob data.
return ObjectId

WriteBlob() public method

Write a blob with the specified data.
public WriteBlob ( byte b ) : ObjectId
b byte Bytes of the blob.
return ObjectId

WriteBlob() public method

Write a blob with data from a stream
public WriteBlob ( long len, Stream input ) : ObjectId
len long Number of bytes to consume from the stream.
input Stream Stream with blob data.
return ObjectId

WriteCanonicalTree() public method

Write a canonical tree to the object database.
public WriteCanonicalTree ( byte buffer ) : ObjectId
buffer byte The canonical encoding of the tree object.
return ObjectId

WriteCommit() public method

Write a Commit to the object database
public WriteCommit ( Commit c ) : ObjectId
c Commit Commit to store.
return ObjectId

WriteTag() public method

Write an annotated Tag to the object database
public WriteTag ( Tag tag ) : ObjectId
tag Tag Tag
return ObjectId

WriteTree() public method

public WriteTree ( Tree t ) : ObjectId
t Tree
return ObjectId