mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
Add -debugDescription and -description to PBGitRef
This commit is contained in:
@@ -42,6 +42,9 @@ extern NSString * const kGitXRemoteRefPrefix;
|
||||
|
||||
- (PBGitRef *) remoteRef;
|
||||
|
||||
- (NSString *)description;
|
||||
- (NSString *)debugDescription;
|
||||
|
||||
- (BOOL) isEqualToRef:(PBGitRef *)otherRef;
|
||||
|
||||
+ (PBGitRef*) refFromString: (NSString*) s;
|
||||
|
||||
@@ -66,6 +66,10 @@ NSString * const kGitXRemoteRefPrefix = @"refs/remotes/";
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSString *) description {
|
||||
return [NSString stringWithFormat:@"<PBGitRef %p> ref = %@", self, self.ref];
|
||||
}
|
||||
|
||||
- (BOOL) isBranch
|
||||
{
|
||||
return [ref hasPrefix:kGitXBranchRefPrefix];
|
||||
@@ -122,6 +126,10 @@ NSString * const kGitXRemoteRefPrefix = @"refs/remotes/";
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (NSString *)debugDescription {
|
||||
return [NSString stringWithFormat:@"<PBGitRef %p> ref = %@, type = %@", self, ref, [self type]];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark <PBGitRefish>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user