GitRepository: Add an "all branches" option in branches list

This is probably the most common non-branch GitX option, so
let's add it by default
This commit is contained in:
Pieter de Bie
2008-10-03 19:25:50 +02:00
parent bae7566cde
commit ffae6a8564
3 changed files with 15 additions and 2 deletions
+8 -1
View File
@@ -11,7 +11,7 @@
@implementation PBGitRevSpecifier
@synthesize parameters;
@synthesize parameters, description;
- (id) initWithParameters:(NSArray*) params
{
@@ -27,6 +27,13 @@
return self;
}
+ (PBGitRevSpecifier *)allBranchesRevSpec
{
id revspec = [[PBGitRevSpecifier alloc] initWithParameters:[NSArray arrayWithObject:@"--all"]];
[revspec setDescription:@"All branches"];
return revspec;
}
- (BOOL) isSimpleRef
{
return ([parameters count] == 1 && ![[parameters objectAtIndex:0] hasPrefix:@"-"]);