mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
- stashes can be created with optional message
- added clearing all stashes - added possibility to ignore files with given extension - submodules are now showed - submodules can be opened
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// PBRemoteCommandFactory.m
|
||||
// GitX
|
||||
//
|
||||
// Created by Tomasz Krasnyk on 10-11-07.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "PBRemoteCommandFactory.h"
|
||||
#import "PBOpenDocumentCommand.h"
|
||||
#import "PBGitSubmodule.h"
|
||||
|
||||
|
||||
@implementation PBRemoteCommandFactory
|
||||
|
||||
+ (NSArray *) commandsForSubmodule:(PBGitSubmodule *) submodule inRepository:(PBGitRepository *) repository {
|
||||
NSMutableArray *commands = [[NSMutableArray alloc] init];
|
||||
|
||||
NSString *repoPath = [repository workingDirectory];
|
||||
|
||||
NSString *path = [repoPath stringByAppendingPathComponent:[submodule path]];
|
||||
|
||||
PBOpenDocumentCommand *command = [[PBOpenDocumentCommand alloc] initWithDocumentAbsolutePath:path];
|
||||
command.commandTitle = command.displayName;
|
||||
command.commandDescription = @"Opening document";
|
||||
[commands addObject:command];
|
||||
|
||||
return commands;
|
||||
}
|
||||
|
||||
+ (NSArray *) commandsForObject:(NSObject *) object repository:(PBGitRepository *) repository {
|
||||
if ([object isKindOfClass:[PBGitSubmodule class]]) {
|
||||
return [PBRemoteCommandFactory commandsForSubmodule:(id)object inRepository:repository];
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user