Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 53 lines (41 sloc) 0.973 kb
b752f5b Pieter de Bie Add a search field and subject
pieter authored
1 //
2 // PBGitCommit.m
3 // GitTest
4 //
5 // Created by Pieter de Bie on 13-06-08.
6 // Copyright 2008 __MyCompanyName__. All rights reserved.
7 //
8
9 #import "PBGitCommit.h"
10
11
12 @implementation PBGitCommit
13
d444c9d Pieter de Bie Add an author field
pieter authored
14 @synthesize sha, repository, subject, author;
b752f5b Pieter de Bie Add a search field and subject
pieter authored
15
3106379 Pieter de Bie Use unified interface and display tree contents
pieter authored
16 - (NSArray*) treeContents
17 {
18 return self.tree.children;
19 }
20
b752f5b Pieter de Bie Add a search field and subject
pieter authored
21 - initWithRepository:(PBGitRepository*) repo andSha:(NSString*) newSha
22 {
3a672ae Pieter de Bie Cache commit details so we have to fork less
pieter authored
23 details = nil;
b752f5b Pieter de Bie Add a search field and subject
pieter authored
24 self.repository = repo;
25 self.sha = newSha;
26 return self;
27 }
28
29 - (NSString*) details
30 {
3a672ae Pieter de Bie Cache commit details so we have to fork less
pieter authored
31 if (details != nil)
32 return details;
33
a3d0d66 Pieter de Bie Use a stylesheet for detailed view
pieter authored
34 NSFileHandle* handle = [self.repository handleForCommand:[@"show --pretty=raw " stringByAppendingString:self.sha]];
3a672ae Pieter de Bie Cache commit details so we have to fork less
pieter authored
35 details = [[NSString alloc] initWithData:[handle readDataToEndOfFile] encoding: NSASCIIStringEncoding];
b752f5b Pieter de Bie Add a search field and subject
pieter authored
36 return details;
37 }
79e9ba9 Pieter de Bie Add a detailed HTML view
pieter authored
38
9be3c50 Pieter de Bie Add a Tree displayer
pieter authored
39 - (PBGitTree*) tree
40 {
41 return [PBGitTree rootForCommit: self];
42 }
43
79e9ba9 Pieter de Bie Add a detailed HTML view
pieter authored
44 + (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector
45 {
46 return NO;
47 }
48
49 + (BOOL)isKeyExcludedFromWebScript:(const char *)name {
50 return NO;
51 }
b752f5b Pieter de Bie Add a search field and subject
pieter authored
52 @end
Something went wrong with that request. Please try again.