File tree 2 files changed +18
-0
lines changed
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,10 @@ typedef enum {
21
21
NSString *checkedOutCommit;
22
22
23
23
PBGitSubmoduleState submoduleState;
24
+
25
+ NSMutableArray *submodules;
24
26
}
27
+ @property (nonatomic , retain , readonly ) NSMutableArray *submodules;
25
28
@property (nonatomic , assign , readonly ) PBGitSubmoduleState submoduleState;
26
29
@property (nonatomic , retain , readonly ) NSString *name;
27
30
@property (nonatomic , retain , readonly ) NSString *path;
@@ -31,4 +34,6 @@ typedef enum {
31
34
32
35
+ (NSImage *) imageForSubmoduleState : (PBGitSubmoduleState) state ;
33
36
+ (PBGitSubmoduleState) submoduleStateFromCharacter : (unichar ) character ;
37
+
38
+ - (void ) addSubmodule : (PBGitSubmodule *) submodule ;
34
39
@end
Original file line number Diff line number Diff line change @@ -20,6 +20,14 @@ @implementation PBGitSubmodule
20
20
@synthesize path;
21
21
@synthesize checkedOutCommit;
22
22
@synthesize submoduleState;
23
+ @synthesize submodules;
24
+
25
+ - (NSMutableArray *) submodules {
26
+ if (!submodules) {
27
+ submodules = [[NSMutableArray alloc ] init ];
28
+ }
29
+ return submodules;
30
+ }
23
31
24
32
- (id ) initWithRawSubmoduleStatusString : (NSString *) submoduleStatusString {
25
33
NSParameterAssert ([submoduleStatusString length ] > 0 );
@@ -51,12 +59,17 @@ - (id) initWithRawSubmoduleStatusString:(NSString *) submoduleStatusString {
51
59
}
52
60
53
61
- (void ) dealloc {
62
+ [submodules release ];
54
63
[name release ];
55
64
[path release ];
56
65
[checkedOutCommit release ];
57
66
[super dealloc ];
58
67
}
59
68
69
+ - (void ) addSubmodule : (PBGitSubmodule *) submodule {
70
+ [self .submodules addObject: submodule];
71
+ }
72
+
60
73
#pragma mark -
61
74
#pragma mark Presentable
62
75
You can’t perform that action at this time.
0 commit comments