#import <GITObjectStore.h>
Inherited by GITCombinedStore, GITFileStore, and GITPackStore.
Public Member Functions | |
| (id) | - initWithRoot: |
| (NSData *) | - dataWithContentsOfObject: |
| (BOOL) | - extractFromObject:type:size:data: |
| (BOOL) | - loadObjectWithSha1:intoData:type:error: |
| - (NSData *) dataWithContentsOfObject: | (NSString*) | sha1 |
Returns the contents of an object for the given sha1. The data returned should be in a form which is usable to initialise an object. If the data is stored compressed or encrypted it should be decompressed or decrypted before returning.
| sha1 | The object reference to return the data for |
| - (BOOL) extractFromObject: | (NSString*) | sha1 | ||
| type: | (NSString**) | type | ||
| size: | (NSUInteger*) | size | ||
| data: | (NSData**) | data | ||
For internal use only.
Returns if the receiver can return the object with the given sha1. Indicates if the receiver is able to return data for an object with the given sha1 identifer.
| sha1 | Name of the object to check for |
| sha1 | The object reference to extract the data from | |
| [out] | type | The type of the object as a string |
| [out] | size | The size of data in bytes |
| [out] | data | The data content of the object |
| - (id) initWithRoot: | (NSString*) | root |
Creates and returns a new store object from the provided .git root
| root | Path to the .git root directory |
| - (BOOL) loadObjectWithSha1: | (NSString*) | sha1 | ||
| intoData: | (NSData**) | data | ||
| type: | (GITObjectType*) | type | ||
| error: | (NSError**) | error | ||
Loads and returns the contents of an object.
| sha1 | The SHA1 name of the object to load | |
| [out] | data | Data to load the object contents into |
| [out] | type | The GITObjectType of the object |
| [out] | error | NSError object containing any errors, pass NULL if you don't care |
For internal use only.
We might possibly consider the following extension to this method once Deltas are being parsed. If the type parameter has a non-zero value then this will be perceived as an expected type setting, an error should be returned if this expected type is not met.
1.5.7