mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
Add -description and/or -debugDescription methods to PBGitCommit, PBGitRef and PBGitRevSpecifier.
This commit is contained in:
@@ -33,6 +33,11 @@ NSString * const kGitXCommitType = @"commit";
|
||||
return p;
|
||||
}
|
||||
|
||||
- (NSString *) description {
|
||||
return [NSString stringWithFormat:@"%@, realSha = %@, %d parent(s), repository = %@",
|
||||
[super description], [self realSha], nParents, repository];
|
||||
}
|
||||
|
||||
- (NSDate *)date
|
||||
{
|
||||
return [NSDate dateWithTimeIntervalSince1970:timestamp];
|
||||
|
||||
+6
-5
@@ -67,7 +67,12 @@ NSString * const kGitXRemoteRefPrefix = @"refs/remotes/";
|
||||
}
|
||||
|
||||
- (NSString *) description {
|
||||
return [NSString stringWithFormat:@"<PBGitRef %p> ref = %@", self, self.ref];
|
||||
return [NSString stringWithFormat:@"<PBGitRef: %p> ref = %@", self, self.ref];
|
||||
}
|
||||
|
||||
|
||||
- (NSString *)debugDescription {
|
||||
return [NSString stringWithFormat:@"<PBGitRef: %p>, ref = %@, type = %@", self, ref, [self type]];
|
||||
}
|
||||
|
||||
- (BOOL) isBranch
|
||||
@@ -126,10 +131,6 @@ NSString * const kGitXRemoteRefPrefix = @"refs/remotes/";
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (NSString *)debugDescription {
|
||||
return [NSString stringWithFormat:@"<PBGitRef %p> ref = %@, type = %@", self, ref, [self type]];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark <PBGitRefish>
|
||||
|
||||
|
||||
@@ -87,6 +87,11 @@
|
||||
return description;
|
||||
}
|
||||
|
||||
- (NSString *) debugDescription {
|
||||
return [NSString stringWithFormat:@"<%@: %p> description = %@, parameters = %@",
|
||||
NSStringFromClass([self class]), self, description, parameters];
|
||||
}
|
||||
|
||||
- (NSString *) title
|
||||
{
|
||||
NSString *title = nil;
|
||||
|
||||
Reference in New Issue
Block a user