5 // Created by Pieter de Bie on 13-06-08.
6 // Copyright 2008 __MyCompanyName__. All rights reserved.
9 #import "PBGitCommit.h"
12 @implementation PBGitCommit
14 @synthesize sha, repository, subject, author, date, parents;
17 - (NSString *) dateString
19 NSDateFormatter* formatter = [[NSDateFormatter alloc] initWithDateFormat:@"%Y-%m-%d %H:%M:%S" allowNaturalLanguage:NO];
20 return [formatter stringFromDate: self.date];
23 - (NSArray*) treeContents
25 return self.tree.children;
28 - initWithRepository:(PBGitRepository*) repo andSha:(NSString*) newSha
31 self.repository = repo;
41 NSFileHandle* handle = [self.repository handleForCommand:[@"show --pretty=raw " stringByAppendingString:self.sha]];
42 details = [[NSString alloc] initWithData:[handle readDataToEndOfFile] encoding: NSUTF8StringEncoding];
49 return [PBGitTree rootForCommit: self];
52 + (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector
57 + (BOOL)isKeyExcludedFromWebScript:(const char *)name {