mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
submodules are now nested
This commit is contained in:
@@ -21,7 +21,10 @@ typedef enum {
|
||||
NSString *checkedOutCommit;
|
||||
|
||||
PBGitSubmoduleState submoduleState;
|
||||
|
||||
NSMutableArray *submodules;
|
||||
}
|
||||
@property (nonatomic, retain, readonly) NSMutableArray *submodules;
|
||||
@property (nonatomic, assign, readonly) PBGitSubmoduleState submoduleState;
|
||||
@property (nonatomic, retain, readonly) NSString *name;
|
||||
@property (nonatomic, retain, readonly) NSString *path;
|
||||
@@ -31,4 +34,6 @@ typedef enum {
|
||||
|
||||
+ (NSImage *) imageForSubmoduleState:(PBGitSubmoduleState) state;
|
||||
+ (PBGitSubmoduleState) submoduleStateFromCharacter:(unichar) character;
|
||||
|
||||
- (void) addSubmodule:(PBGitSubmodule *) submodule;
|
||||
@end
|
||||
|
||||
@@ -20,6 +20,14 @@
|
||||
@synthesize path;
|
||||
@synthesize checkedOutCommit;
|
||||
@synthesize submoduleState;
|
||||
@synthesize submodules;
|
||||
|
||||
- (NSMutableArray *) submodules {
|
||||
if (!submodules) {
|
||||
submodules = [[NSMutableArray alloc] init];
|
||||
}
|
||||
return submodules;
|
||||
}
|
||||
|
||||
- (id) initWithRawSubmoduleStatusString:(NSString *) submoduleStatusString {
|
||||
NSParameterAssert([submoduleStatusString length] > 0);
|
||||
@@ -51,12 +59,17 @@
|
||||
}
|
||||
|
||||
- (void) dealloc {
|
||||
[submodules release];
|
||||
[name release];
|
||||
[path release];
|
||||
[checkedOutCommit release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) addSubmodule:(PBGitSubmodule *) submodule {
|
||||
[self.submodules addObject:submodule];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Presentable
|
||||
|
||||
|
||||
Reference in New Issue
Block a user