mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
9bfccb5ea5
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
40 lines
1005 B
Objective-C
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
|