mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
HistoryView: Add a "Local Branches" option
This commit is contained in:
@@ -221,6 +221,7 @@ NSString* PBGitRepositoryErrorDomain = @"GitXErrorDomain";
|
||||
|
||||
// Add an "All branches" option in the branches list
|
||||
[self addBranch:[PBGitRevSpecifier allBranchesRevSpec]];
|
||||
[self addBranch:[PBGitRevSpecifier localBranchesRevSpec]];
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
- (BOOL) isEqualTo: (PBGitRevSpecifier*) other;
|
||||
|
||||
+ (PBGitRevSpecifier *)allBranchesRevSpec;
|
||||
+ (PBGitRevSpecifier *)localBranchesRevSpec;
|
||||
|
||||
@property(copy) NSString* description;
|
||||
@property(readonly) NSArray* parameters;
|
||||
|
||||
+7
-1
@@ -33,7 +33,13 @@
|
||||
[revspec setDescription:@"All branches"];
|
||||
return revspec;
|
||||
}
|
||||
|
||||
|
||||
+ (PBGitRevSpecifier *)localBranchesRevSpec
|
||||
{
|
||||
id revspec = [[PBGitRevSpecifier alloc] initWithParameters:[NSArray arrayWithObject:@"--branches"]];
|
||||
[revspec setDescription:@"Local branches"];
|
||||
return revspec;
|
||||
}
|
||||
- (BOOL) isSimpleRef
|
||||
{
|
||||
return ([parameters count] == 1 && ![[parameters objectAtIndex:0] hasPrefix:@"-"]);
|
||||
|
||||
Reference in New Issue
Block a user