Files
gitx/PBGitRef.h
T
Nathan Kinsinger 39def32a1b Add <PBGitRefish> protocol.
This will simplify methods that execute git commands that can take a ref or an SHA.

Add some string constants so there is only one place for the type strings.
2010-02-19 22:55:07 -07:00

52 lines
1.0 KiB
Objective-C

//
// PBGitRef.h
// GitX
//
// Created by Pieter de Bie on 06-09-08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "PBGitRefish.h"
extern NSString * const kGitXTagType;
extern NSString * const kGitXBranchType;
extern NSString * const kGitXRemoteType;
extern NSString * const kGitXRemoteBranchType;
extern NSString * const kGitXTagRefPrefix;
extern NSString * const kGitXBranchRefPrefix;
extern NSString * const kGitXRemoteRefPrefix;
@interface PBGitRef : NSObject <PBGitRefish> {
NSString* ref;
}
// <PBGitRefish>
- (NSString *) refishName;
- (NSString *) shortName;
- (NSString *) refishType;
- (NSString *) tagName;
- (NSString *) branchName;
- (NSString *) remoteName;
- (NSString *) remoteBranchName;
- (NSString *) type;
- (BOOL) isBranch;
- (BOOL) isTag;
- (BOOL) isRemote;
- (BOOL) isRemoteBranch;
- (PBGitRef *) remoteRef;
- (BOOL) isEqualToRef:(PBGitRef *)otherRef;
+ (PBGitRef*) refFromString: (NSString*) s;
- (PBGitRef*) initWithString: (NSString*) s;
@property(readonly) NSString* ref;
@end