Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

HistoryView: Add a "Local Branches" option

  • Loading branch information...
commit 6038c20d7d170dbd7ef132f3790043793ccce13b 1 parent a62e14f
@pieter pieter authored
View
1  PBGitRepository.m
@@ -221,6 +221,7 @@ - (BOOL) reloadRefs
// Add an "All branches" option in the branches list
[self addBranch:[PBGitRevSpecifier allBranchesRevSpec]];
+ [self addBranch:[PBGitRevSpecifier localBranchesRevSpec]];
return ret;
}
View
1  PBGitRevSpecifier.h
@@ -25,6 +25,7 @@
- (BOOL) isEqualTo: (PBGitRevSpecifier*) other;
+ (PBGitRevSpecifier *)allBranchesRevSpec;
++ (PBGitRevSpecifier *)localBranchesRevSpec;
@property(copy) NSString* description;
@property(readonly) NSArray* parameters;
View
8 PBGitRevSpecifier.m
@@ -33,7 +33,13 @@ + (PBGitRevSpecifier *)allBranchesRevSpec
[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:@"-"]);
Please sign in to comment.
Something went wrong with that request. Please try again.