5 // Created by Pieter de Bie on 22-09-08.
6 // Copyright 2008 __MyCompanyName__. All rights reserved.
9 #import "PBChangedFile.h"
10 #import "PBEasyPipe.h"
12 @implementation PBChangedFile
14 @synthesize path, status, hasStagedChanges, hasUnstagedChanges, commitBlobSHA, commitBlobMode;
16 - (id) initWithPath:(NSString *)p
25 - (NSString *)indexInfo
27 NSAssert(status == NEW || self.commitBlobSHA, @"File is not new, but doesn't have an index entry!");
28 if (!self.commitBlobSHA)
29 return [NSString stringWithFormat:@"0 0000000000000000000000000000000000000000\t%@\0", self.path];
31 return [NSString stringWithFormat:@"%@ %@\t%@\0", self.commitBlobMode, self.commitBlobSHA, self.path];
39 filename = @"new_file";
42 filename = @"deleted_file";
45 filename = @"empty_file";
48 NSString *p = [[NSBundle mainBundle] pathForResource:filename ofType:@"png"];
49 return [[NSImage alloc] initByReferencingFile: p];
52 + (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector
57 + (BOOL)isKeyExcludedFromWebScript:(const char *)name {