Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Extend PBGitRevSPecifier

This makes the description more useful and adds a
path limiter function
  • Loading branch information...
commit fc881176591e993f29585bc53db394bd0690bdde 1 parent e3af731
@pieter pieter authored
Showing with 17 additions and 1 deletion.
  1. +1 −0  PBGitRevSpecifier.h
  2. +16 −1 PBGitRevSpecifier.m
View
1  PBGitRevSpecifier.h
@@ -19,6 +19,7 @@
- (BOOL) isSimpleRef;
- (NSString*) simpleRef;
+- (BOOL) hasPathLimiter;
@property(readonly) NSString* description;
@property(readonly) NSArray* parameters;
View
17 PBGitRevSpecifier.m
@@ -11,7 +11,7 @@
@implementation PBGitRevSpecifier
-@synthesize description, parameters;
+@synthesize parameters;
- (id) initWithParameters:(NSArray*) params
{
@@ -39,4 +39,19 @@ - (NSString*) simpleRef
return [parameters objectAtIndex:0];
}
+- (NSString*) description
+{
+ if (description)
+ return description;
+
+ return [parameters componentsJoinedByString:@" "];
+}
+
+- (BOOL) hasPathLimiter;
+{
+ for (NSString* param in parameters)
+ if ([param isEqualToString:@"--"])
+ return YES;
+ return NO;
+}
@end
Please sign in to comment.
Something went wrong with that request. Please try again.