GITRepo Class Reference
#import <GITRepo.h>
List of all members.
Detailed Description
A repository of git objects. This class serves to encapsulate the access to the objects of a repository.
- Todo:
- Consider the lifetime of this object. Is it going to be better to retain the repo in the objects instead of copying it. Should we enforce this by changing -copyWithZone: to just return the retained instance of GITRepo or should we leave it capable of being copied but change our usage of it to retains?
Member Function Documentation
| - (GITBlob *) blobWithSha1: |
|
(NSString*) |
sha1 |
|
|
Returns a blob object identified by the given sha1.
- Parameters:
-
| sha1 | The identifier of the blob to load |
- Returns:
- A blob object with the given sha1 or nil if it cannot be found.
- Deprecated:
- Use -blobWithSha1:error: instead
| - (GITBlob *) blobWithSha1: |
|
(NSString*) |
sha1 |
| error: |
|
(NSError**) |
error | |
|
|
| | |
Returns a blob object identified by the given sha1.
- Parameters:
-
| sha1 | The identifier of the blob to load |
| [out] | error | Contains the error if nil return value |
- Returns:
- A blob object with the given sha1 or nil if it cannot be found.
| - (GITCommit *) commitWithSha1: |
|
(NSString*) |
sha1 |
|
|
Returns a commit object identified by the given sha1.
- Parameters:
-
| sha1 | The identifier of the commit to load |
- Returns:
- A commit object with the given sha1 or nil if it cannot be found.
- Deprecated:
- Use -commitWithSha1:error: instead
| - (GITCommit *) commitWithSha1: |
|
(NSString*) |
sha1 |
| error: |
|
(NSError**) |
error | |
|
|
| | |
Returns a commit object identified by the given sha1.
- Parameters:
-
| sha1 | The identifier of the commit to load |
| [out] | error | Contains the error if nil return value |
- Returns:
- A commit object with the given sha1 or nil if it cannot be found.
| - (id) copyWithZone: |
|
(NSZone*) |
zone |
|
|
Returns a new instance that's a copy of the receiver.
For internal use only.
This will create a new instance of the GITObjectStore for the receiver.
- Parameters:
-
| zone | The zone identifies an area of memory from which to allocate for the new instance. If zone is NULL, the new instance is allocated from the default zone, which is returned from the function NSDefaultMallocZone. |
| - (NSData *) dataWithContentsOfObject: |
|
(NSString*) |
sha1 |
|
|
Returns the raw content data for an object.
- Attention:
- This method does not do anything to verify the size or type of the object being returned.
- Parameters:
-
- Returns:
- Data containing the content of the object
- Deprecated:
- Superceeded by -objectWithSha1:error:
| - (NSData *) dataWithContentsOfObject: |
|
(NSString*) |
sha1 |
| type: |
|
(NSString*) |
expectedType | |
|
|
| | |
Returns the content data for an object. The expectedType is used to check the type identifier in the file is of a certain value. If the object referred to by sha1 is not of the correct type then nil is returned.
- Parameters:
-
| sha1 | Name of the objects |
| expectedType | String used to check the object is of a specific type |
- Returns:
- Data containing the content of the object or nil if not of expected type
- Deprecated:
- Superceeded by -objectWithSha1:type:error:
| - (id) initWithRoot: |
|
(NSString*) |
repoRoot |
|
|
Creates and returns a repo object with the provided root.
- Parameters:
-
| repoRoot | The path, relative or absolute, to the repository root. |
- Returns:
- A repo object with the provided root.
| - (id) initWithRoot: |
|
(NSString*) |
repoRoot |
| bare: |
|
(BOOL) |
isBare | |
|
|
| | |
Creates and returns a repo object with the provided root.
- Parameters:
-
| repoRoot | The path, relative or absolute, to the repository root. |
| isBare | Flag indicating if the repository is bare. |
- Returns:
- A repo object with the provided root.
| - (GITObject *) objectWithSha1: |
|
(NSString*) |
sha1 |
|
|
Returns an object identified by the given sha1.
- Parameters:
-
| sha1 | The identifier of the object to load |
- Returns:
- A object with the given sha1 or nil if it cannot be found.
- Deprecated:
- Use -objectWithSha1:error: instead
| - (GITObject *) objectWithSha1: |
|
(NSString*) |
sha1 |
| error: |
|
(NSError**) |
error | |
|
|
| | |
Returns an object identified by the given sha1.
- Parameters:
-
| sha1 | The identifier of the object to load |
| [out] | error | Contains the error if nil return value |
- Returns:
- A object with the given sha1 or nil if it cannot be found.
Returns an object identified by the given sha1.
- Parameters:
-
| sha1 | The identifier of the object to load |
| type | The GITObjectType to return, GITObjectTypeUnknown if not known. |
| [out] | error | Contains the error if nil return value |
- Returns:
- A object with the given sha1 or nil if it cannot be found.
| - (GITTag *) tagWithSha1: |
|
(NSString*) |
sha1 |
|
|
Returns a tag object identified by the given sha1.
- Parameters:
-
| sha1 | The identifier of the tag to load |
- Returns:
- A tag object with the given sha1 or nil if it cannot be found.
- Deprecated:
- Use -tagWithSha1:error: instead
| - (GITTag *) tagWithSha1: |
|
(NSString*) |
sha1 |
| error: |
|
(NSError**) |
error | |
|
|
| | |
Returns a tag object identified by the given sha1.
- Parameters:
-
| sha1 | The identifier of the tag to load |
| [out] | error | Contains the error if nil return value |
- Returns:
- A tag object with the given sha1 or nil if it cannot be found.
| - (GITTree *) treeWithSha1: |
|
(NSString*) |
sha1 |
|
|
Returns a tree object identified by the given sha1.
- Parameters:
-
| sha1 | The identifier of the tree to load |
- Returns:
- A tree object with the given sha1 or nil if it cannot be found.
- Deprecated:
- Use -treeWithSha1:error: instead
| - (GITTree *) treeWithSha1: |
|
(NSString*) |
sha1 |
| error: |
|
(NSError**) |
error | |
|
|
| | |
Returns a tree object identified by the given sha1.
- Parameters:
-
| sha1 | The identifier of the tree to load |
| [out] | error | Contains the error if nil return value |
- Returns:
- A tree object with the given sha1 or nil if it cannot be found.
Member Data Documentation
The store which will be used to find objects.
Property Documentation
- (NSString *) desc [read, copy] |
Description of the repository.
- (NSString *) root [read, copy] |
Path to the repository root.
The documentation for this class was generated from the following files: