From 19750e15a061c060ae0ea6e1feadbd7bbee5ee6a Mon Sep 17 00:00:00 2001 From: Pieter de Bie Date: Wed, 8 Oct 2008 13:36:09 +0200 Subject: [PATCH] Add ~/bin/git to search paths --- PBGitBinary.m | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/PBGitBinary.m b/PBGitBinary.m index 8c8c4aa..aeb6d79 100644 --- a/PBGitBinary.m +++ b/PBGitBinary.m @@ -45,14 +45,21 @@ static NSString* gitPath; return gitPath; } +static NSMutableArray *locations = nil; + + (NSArray *) searchLocations { - NSArray* locations = [NSArray arrayWithObjects:@"/opt/local/bin/git", + if (locations) + return locations; + + locations = [NSMutableArray arrayWithObjects:@"/opt/local/bin/git", @"/sw/bin/git", @"/opt/git/bin/git", @"/usr/local/bin/git", @"/usr/local/git/bin/git", nil]; + + [locations addObject:[@"~/bin/git" stringByExpandingTildeInPath]]; return locations; }