File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ typedef enum {
1717 GTDiffFileFlagNotBinary = GIT_DIFF_FLAG_NOT_BINARY,
1818} GTDiffFileFlag;
1919
20+ @class GTOID;
21+
2022// A class representing a file on one side of a diff.
2123@interface GTDiffFile : NSObject
2224
@@ -32,6 +34,9 @@ typedef enum {
3234// The mode of the file.
3335@property (nonatomic , readonly ) mode_t mode;
3436
37+ // The OID
38+ @property (nonatomic , readonly ) GTOID *OID;
39+
3540// Designated initialiser.
3641- (instancetype )initWithGitDiffFile : (git_diff_file)file ;
3742
Original file line number Diff line number Diff line change 77//
88
99#import " GTDiffFile.h"
10+ #import " GTOID.h"
1011
1112@implementation GTDiffFile
1213
@@ -18,6 +19,7 @@ - (instancetype)initWithGitDiffFile:(git_diff_file)file {
1819 _flags = (GTDiffFileFlag)file.flags ;
1920 _mode = file.mode ;
2021 _path = [NSString stringWithUTF8String: file.path];
22+ _OID = [[GTOID alloc ] initWithGitOid: &(file.oid)];
2123
2224 return self;
2325}
You can’t perform that action at this time.
0 commit comments