Add -debugDescription and -description to PBGitRef

This commit is contained in:
André Berg
2010-03-30 15:11:16 +02:00
parent 34c404a6d9
commit 156d67f1fb
2 changed files with 11 additions and 0 deletions
+3
View File
@@ -42,6 +42,9 @@ extern NSString * const kGitXRemoteRefPrefix;
- (PBGitRef *) remoteRef;
- (NSString *)description;
- (NSString *)debugDescription;
- (BOOL) isEqualToRef:(PBGitRef *)otherRef;
+ (PBGitRef*) refFromString: (NSString*) s;
+8
View File
@@ -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>