Skip to content

Commit 3cf9aca

Browse files
committed
Put /usr/local/bin/git first in list
People can install their own hits and have that used in preference.
1 parent b45ca64 commit 3cf9aca

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

PBGitBinary.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@
77
//
88

99
#import <Cocoa/Cocoa.h>
10-
1110
#define MIN_GIT_VERSION "1.6.0"
1211

13-
@interface PBGitBinary : NSObject {
14-
15-
}
1612

13+
@interface PBGitBinary : NSObject
1714
+ (NSString *) path;
1815
+ (NSString *) version;
1916
+ (NSArray *) searchLocations;

PBGitBinary.m

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,16 @@ + (void) initialize
8383
NSLog(@"Could not find a git binary higher than version " MIN_GIT_VERSION);
8484
}
8585

86-
+ (NSString *) path;
87-
{
86+
+ (NSString *)path {
8887
return gitPath;
8988
}
9089

91-
+ (NSArray *)searchLocations
92-
{
90+
+ (NSArray *)searchLocations {
9391
return @[
94-
@"/usr/bin/git",
95-
@"/Applications/Xcode.app/Contents/Developer/usr/bin/git",
9692
@"/usr/local/bin/git",
9793
@"/opt/local/bin/git",
94+
@"/usr/bin/git",
95+
@"/Applications/Xcode.app/Contents/Developer/usr/bin/git",
9896
@"/sw/bin/git",
9997
@"/opt/git/bin/git",
10098
@"/usr/local/git/bin/git",
@@ -114,10 +112,8 @@ + (NSString *) notFoundError
114112
}
115113

116114

117-
+ (NSString *)version
118-
{
115+
+ (NSString *)version {
119116
return [self versionForPath:gitPath];
120117
}
121118

122-
123119
@end

0 commit comments

Comments
 (0)