HistoryController: Add "Open Files" menu item
[GitX.git] / PBGitRepository.h
blob93c38c9fa9e76b82d3e918818c8aeb91d790cba8
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 *)arguments inputString:(NSString *)input byExtendingEnvironment:(NSDictionary *)dict retValue:(int *)ret;
39 - (NSString*) outputForArguments:(NSArray*) args;
40 - (NSString*) outputForArguments:(NSArray*) args retValue:(int *)ret;
41 - (NSString *)outputInWorkdirForArguments:(NSArray*) arguments;
42 - (NSString *)outputInWorkdirForArguments:(NSArray*) arguments retValue:(int *)ret;
43 - (BOOL)executeHook:(NSString *)name output:(NSString **)output;
44 - (BOOL)executeHook:(NSString *)name withArgs:(NSArray*) arguments output:(NSString **)output;
46 - (NSString *)workingDirectory;
47 - (NSString *)gitIgnoreFilename;
48 - (BOOL)isBareRepository;
50 - (BOOL) reloadRefs;
51 - (void) addRef:(PBGitRef *)ref fromParameters:(NSArray *)params;
52 - (void) lazyReload;
53 - (PBGitRevSpecifier*) headRef;
55 - (void) readCurrentBranch;
56 - (PBGitRevSpecifier*) addBranch: (PBGitRevSpecifier*) rev;
57 - (BOOL)removeBranch:(PBGitRevSpecifier *)rev;
59 - (NSString*) parseSymbolicReference:(NSString*) ref;
60 - (NSString*) parseReference:(NSString*) ref;
62 + (NSURL*)gitDirForURL:(NSURL*)repositoryURL;
63 + (NSURL*)baseDirForURL:(NSURL*)repositoryURL;
65 - (id) initWithURL: (NSURL*) path;
66 - (void) setup;
68 @property (assign) BOOL hasChanged;
69 @property (readonly) PBGitWindowController *windowController;
70 @property (readonly) PBGitConfig *config;
71 @property (retain) PBGitRevList* revisionList;
72 @property (assign) NSMutableArray* branches;
73 @property (assign) PBGitRevSpecifier *currentBranch;
74 @property (retain) NSMutableDictionary* refs;
75 @end