Files
gitx/PBGitRepository.h
T
Pieter de Bie 9bfccb5ea5 Grapher: add first part of displaying refs
This adds the "hasRef" boolean member in PBGitCellInfo which is set to true
if the specific commit has symbolic refs.

This is the first part in supporting labels just like gitk has. For now,
commits with refs are just displayed with a red circle.

Things that need to be done to support all refs:

	* Make the NSDictionary in PBGitRepository contain arrays of refs,
	  not a single string
	* Make PBGitGrapher store all refs of a commit in the PBGitCellInfo
	* Figure out a nice way to display the labels in PBGitRevisionCell
2008-08-28 17:29:34 +02:00

40 lines
1005 B
Objective-C

//
// PBGitRepository.h
// GitTest
//
// Created by Pieter de Bie on 13-06-08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "PBGitRevList.h"
extern NSString* PBGitRepositoryErrorDomain;
@interface PBGitRepository : NSDocument {
PBGitRevList* revisionList;
NSArray* branches;
NSString* currentBranch;
NSDictionary* refs;
}
- (NSFileHandle*) handleForCommand:(NSString*) cmd;
- (NSFileHandle*) handleForArguments:(NSArray*) args;
- (NSString*) outputForCommand:(NSString*) cmd;
- (NSString*) outputForArguments:(NSArray*) args;
- (void) readRefs;
- (void) readCurrentBranch;
- (NSString*) parseSymbolicReference:(NSString*) ref;
- (NSString*) parseReference:(NSString*) ref;
+ (NSURL*)gitDirForURL:(NSURL*)repositoryURL;
+ (NSURL*)baseDirForURL:(NSURL*)repositoryURL;
@property (readonly) PBGitRevList* revisionList;
@property (assign) NSArray* branches;
@property (assign) NSString* currentBranch;
@property (assign) NSDictionary* refs;
@end