File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ static NSString * PBStringFromBranchFilterType(PBGitXBranchFilterType type) {
128128- (id ) initWithURL : (NSURL *) path ;
129129- (void ) setup ;
130130- (void ) forceUpdateRevisions ;
131+ - (NSURL *) getIndexURL ;
131132
132133// for the scripting bridge
133134- (void )findInModeScriptCommand : (NSScriptCommand *)command ;
@@ -141,5 +142,6 @@ static NSString * PBStringFromBranchFilterType(PBGitXBranchFilterType type) {
141142@property (assign ) PBGitRevSpecifier *currentBranch;
142143@property (assign ) NSInteger currentBranchFilter;
143144@property (retain ) NSMutableDictionary * refs;
145+ @property (readonly , getter = getIndexURL) NSURL * indexURL;
144146
145147@end
Original file line number Diff line number Diff line change @@ -1127,6 +1127,13 @@ - (NSString*) parseSymbolicReference:(NSString*) reference
11271127 return nil ;
11281128}
11291129
1130+ - (NSURL *) getIndexURL
1131+ {
1132+ GTRepository* gtRepo = [[GTRepository repositoryWithURL: self .fileURL error: nil ] autorelease ];
1133+ NSString * indexPath = [NSString stringWithUTF8String: git_repository_path (gtRepo.repo, GIT_REPO_PATH_INDEX)];
1134+ NSURL * indexURL = [NSURL fileURLWithPath: indexPath];
1135+ return [indexURL autorelease ];
1136+ }
11301137- (void ) finalize
11311138{
11321139 NSLog (@" Dealloc of repository" );
You can’t perform that action at this time.
0 commit comments