Permalink
Browse files

Update GTCommit to use the new API.

  • Loading branch information...
1 parent 882958c commit 4bca3e63c67a292850a1654c415e957aae80e45d Danny Greg committed Mar 28, 2013
Showing with 6 additions and 6 deletions.
  1. +6 −6 Classes/GTCommit.m
View
@@ -120,16 +120,16 @@ - (NSString *)messageSummary {
return messageComponents.count > 0 ? [messageComponents objectAtIndex:0] : @"";
}
+- (git_time)commitTime {
+ return (git_time){ .time = git_commit_time(self.git_commit), .offset = git_commit_time_offset(self.git_commit) };
+}
+
- (NSDate *)commitDate {
- git_time time = (git_time){ .time = git_commit_time(self.git_commit), .offset = git_commit_time_offset(self.git_commit) };
- return [NSDate gt_dateFromGitTime:time timeZone:NULL];
+ return [NSDate gt_dateFromGitTime:self.commitTime];
}
- (NSTimeZone *)commitTimeZone {
- NSTimeZone *timeZone = nil;
- git_time time = (git_time){ .time = git_commit_time(self.git_commit), .offset = git_commit_time_offset(self.git_commit) };
- [NSDate gt_dateFromGitTime:time timeZone:&timeZone];
- return timeZone;
+ return [NSTimeZone gt_timeZoneFromGitTime:self.commitTime];
}
- (GTSignature *)author {

0 comments on commit 4bca3e6

Please sign in to comment.