Skip to content

Commit 504b617

Browse files
andrebergbrotherbard
authored andcommitted
Add PBStringFromBranchFilterType() function for debugging purposes to PBGitRepository.
Add a PBGitXBranchFilterType typedef to the kGitX... branch filters enum.
1 parent c073202 commit 504b617

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

PBGitRepository.h

+19-2
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,28 @@
1313
#import "PBGitRefish.h"
1414

1515
extern NSString* PBGitRepositoryErrorDomain;
16-
enum branchFilterTypes {
16+
typedef enum branchFilterTypes {
1717
kGitXAllBranchesFilter = 0,
1818
kGitXLocalRemoteBranchesFilter,
1919
kGitXSelectedBranchFilter
20-
};
20+
} PBGitXBranchFilterType;
21+
22+
static NSString * PBStringFromBranchFilterType(PBGitXBranchFilterType type) {
23+
switch (type) {
24+
case kGitXAllBranchesFilter:
25+
return @"All";
26+
break;
27+
case kGitXLocalRemoteBranchesFilter:
28+
return @"Local";
29+
break;
30+
case kGitXSelectedBranchFilter:
31+
return @"Selected";
32+
break;
33+
default:
34+
break;
35+
}
36+
return @"Not a branch filter type";
37+
}
2138

2239
@class PBGitWindowController;
2340
@class PBGitCommit;

0 commit comments

Comments
 (0)