GitCommitController: clean up index functions
[GitX.git] / PBGitRepository.h
blob75247058dfb6d9ec4e1fcb5a9bc5a9708fc68f64
1 //
2 // PBGitRepository.h
3 // GitTest
4 //
5 // Created by Pieter de Bie on 13-06-08.
6 // Copyright 2008 __MyCompanyName__. All rights reserved.
7 //
9 #import <Cocoa/Cocoa.h>
10 #import "PBGitRevList.h"
11 #import "PBGitRevSpecifier.h"
12 #import "PBGitConfig.h"
14 extern NSString* PBGitRepositoryErrorDomain;
16 @class PBGitWindowController;
18 @interface PBGitRepository : NSDocument {
19 PBGitRevList* revisionList;
20 PBGitConfig *config;
22 BOOL hasChanged;
23 NSMutableArray *branches;
24 PBGitRevSpecifier *currentBranch;
25 NSMutableDictionary *refs;
27 PBGitRevSpecifier *_headRef; // Caching
30 - (NSFileHandle*) handleForCommand:(NSString*) cmd;
31 - (NSFileHandle*) handleForArguments:(NSArray*) args;
32 - (NSFileHandle *) handleInWorkDirForArguments:(NSArray *)args;
33 - (NSString*) outputForCommand:(NSString*) cmd;
34 - (NSString *)outputForCommand:(NSString *)str retValue:(int *)ret;
35 - (NSString *)outputForArguments:(NSArray *)arguments inputString:(NSString *)input retValue:(int *)ret;
36 - (NSString*) outputForArguments:(NSArray*) args;
37 - (NSString*) outputForArguments:(NSArray*) args retValue:(int *)ret;
38 - (NSString *)outputInWorkdirForArguments:(NSArray*) arguments;
39 - (NSString *)outputInWorkdirForArguments:(NSArray*) arguments retValue:(int *)ret;
41 - (NSString *)workingDirectory;
42 - (NSString *)gitIgnoreFilename;
43 - (BOOL)isBareRepository;
45 - (BOOL) reloadRefs;
46 - (void) addRef:(PBGitRef *)ref fromParameters:(NSArray *)params;
47 - (void) lazyReload;
48 - (PBGitRevSpecifier*) headRef;
50 - (void) readCurrentBranch;
51 - (PBGitRevSpecifier*) addBranch: (PBGitRevSpecifier*) rev;
53 - (NSString*) parseSymbolicReference:(NSString*) ref;
54 - (NSString*) parseReference:(NSString*) ref;
56 + (NSURL*)gitDirForURL:(NSURL*)repositoryURL;
57 + (NSURL*)baseDirForURL:(NSURL*)repositoryURL;
59 - (id) initWithURL: (NSURL*) path;
60 - (void) setup;
62 @property (assign) BOOL hasChanged;
63 @property (readonly) PBGitWindowController *windowController;
64 @property (readonly) PBGitConfig *config;
65 @property (retain) PBGitRevList* revisionList;
66 @property (assign) NSMutableArray* branches;
67 @property (assign) PBGitRevSpecifier *currentBranch;
68 @property (retain) NSMutableDictionary* refs;
69 @end