Declared in | GITPackObject.h |
---|
The GITPackObject
class aids in the extraction of objects from PACK files.
The class combines the data of the object and the indicated type for later conversion into a normal git object type such as commit, tree, blob or tag.
When loading an object from a PACK file you do not create instances of this class directly, rather you call the -unpackObjectWithSha1:error: method on the GITPackFile
and an instance of this class is returned.
GITPackObject
sGITPackObject
sType of the object the data represents.
@property GITObjectType type
GITPackObject
.h
Data of the packed object.
@property NSData *data
GITPackObject
.h
SHA1 Hash of the packed object.
@property GITObjectHash *sha1
GITPackObject
.h
size of the receivers data
@property NSUInteger length
GITPackObject
.h
+ (GITPackObject *)packObjectWithData:(NSData *)packData sha1:(GITObjectHash *)objectHash type:(GITObjectType)objectType
Data to create the PACK object from
The SHA1 hash of the object
Type of object the packData represents
new pack object
Create and return a new PACK object.
GITPackObject
.h
- (id)initWithData:(NSData *)packData sha1:(GITObjectHash *)objectHash type:(GITObjectType)objectType
Data of the object
The SHA1 hash of the object
Type of the object the packData represents
new pack object
Create and return a new PACK object.
GITPackObject
.h
- (GITObject *)objectInRepo:(GITRepo *)repo error:(NSError **)error
Repository the object should belong to
NSError
describing any errors which occurred
object in the repo
Returns the object contained in the receiver and sets the repo of the object.
GITPackObject
.h
- (GITPackObject *)packObjectByDeltaPatchingWithData:(NSData *)deltaData
Data to patch the receivers data with
new PACK object with the result of patching the receivers data with deltaData
Returns a new PACK object by patching the receivers data with deltaData.
GITPackObject
.h
Last updated: 2011-2-20