mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
1323638791
- NSCopying
- change isEqualTo: to isEqual: so that it works well with NSArray's (containsObject: and removeObject: will use isEqual: instead of pointer equality)
- add hash to go with isEqual:
- pre-calculate the isSimpleRef value. The rangeOf... methods are very slow and have a major effect on the tight loop in reloadRefs.
41 lines
903 B
Objective-C
41 lines
903 B
Objective-C
//
|
|
// PBGitRevSpecifier.h
|
|
// GitX
|
|
//
|
|
// Created by Pieter de Bie on 12-09-08.
|
|
// Copyright 2008 __MyCompanyName__. All rights reserved.
|
|
//
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
#import <PBGitRef.h>
|
|
|
|
@interface PBGitRevSpecifier : NSObject <NSCopying> {
|
|
NSString *description;
|
|
NSArray *parameters;
|
|
NSURL *workingDirectory;
|
|
BOOL isSimpleRef;
|
|
}
|
|
|
|
- (id) initWithParameters:(NSArray*) params;
|
|
- (id) initWithRef: (PBGitRef*) ref;
|
|
|
|
- (NSString*) simpleRef;
|
|
- (PBGitRef *) ref;
|
|
- (BOOL) hasPathLimiter;
|
|
- (BOOL) hasLeftRight;
|
|
- (NSString *) title;
|
|
|
|
- (BOOL) isEqual: (PBGitRevSpecifier*) other;
|
|
- (BOOL) isAllBranchesRev;
|
|
- (BOOL) isLocalBranchesRev;
|
|
|
|
+ (PBGitRevSpecifier *)allBranchesRevSpec;
|
|
+ (PBGitRevSpecifier *)localBranchesRevSpec;
|
|
|
|
@property(retain) NSString *description;
|
|
@property(readonly) NSArray *parameters;
|
|
@property(retain) NSURL *workingDirectory;
|
|
@property(readonly) BOOL isSimpleRef;
|
|
|
|
@end
|