Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

PBGitRepository: Add support for changing the environment when execut…

…ing commands
  • Loading branch information...
commit aa43e18d619ee45d926afafcb4cb2935b8810751 1 parent b382b34
Pieter de Bie authored

Showing 2 changed files with 14 additions and 1 deletion. Show diff stats Hide diff stats

  1. +3 0  PBGitRepository.h
  2. +11 1 PBGitRepository.m
3  PBGitRepository.h
@@ -33,6 +33,9 @@ extern NSString* PBGitRepositoryErrorDomain;
33 33 - (NSString*) outputForCommand:(NSString*) cmd;
34 34 - (NSString *)outputForCommand:(NSString *)str retValue:(int *)ret;
35 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;
  37 +
  38 +
36 39 - (NSString*) outputForArguments:(NSArray*) args;
37 40 - (NSString*) outputForArguments:(NSArray*) args retValue:(int *)ret;
38 41 - (NSString *)outputInWorkdirForArguments:(NSArray*) arguments;
12 PBGitRepository.m
@@ -384,7 +384,7 @@ - (NSString*) outputForArguments:(NSArray *)arguments retValue:(int *)ret
384 384 return [PBEasyPipe outputForCommand:[PBGitBinary path] withArgs:arguments inDir: self.fileURL.path retValue: ret];
385 385 }
386 386
387   -- (NSString*) outputForArguments:(NSArray *)arguments inputString:(NSString *)input retValue:(int *)ret;
  387 +- (NSString*) outputForArguments:(NSArray *)arguments inputString:(NSString *)input retValue:(int *)ret
388 388 {
389 389 return [PBEasyPipe outputForCommand:[PBGitBinary path]
390 390 withArgs:arguments
@@ -393,6 +393,16 @@ - (NSString*) outputForArguments:(NSArray *)arguments inputString:(NSString *)in
393 393 retValue: ret];
394 394 }
395 395
  396 +- (NSString *)outputForArguments:(NSArray *)arguments inputString:(NSString *)input byExtendingEnvironment:(NSDictionary *)dict retValue:(int *)ret
  397 +{
  398 + return [PBEasyPipe outputForCommand:[PBGitBinary path]
  399 + withArgs:arguments
  400 + inDir:[self workingDirectory]
  401 + byExtendingEnvironment:dict
  402 + inputString:input
  403 + retValue: ret];
  404 +}
  405 +
396 406 - (BOOL)executeHook:(NSString *)name output:(NSString **)output
397 407 {
398 408 return [self executeHook:name withArgs:[NSArray array] output:output];

0 comments on commit aa43e18

Please sign in to comment.
Something went wrong with that request. Please try again.