File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,12 @@ typedef enum {
5252// The name of the reference.
5353@property (nonatomic , readonly , copy ) NSString *name;
5454
55+ // Whether this is a tag.
56+ @property (nonatomic , readonly , getter = isTag) BOOL tag;
57+
58+ // Whether this is a local branch.
59+ @property (nonatomic , readonly , getter = isBranch) BOOL branch;
60+
5561// Whether this is a remote-tracking branch.
5662@property (nonatomic , readonly , getter = isRemote) BOOL remote;
5763
Original file line number Diff line number Diff line change @@ -167,6 +167,14 @@ - (BOOL)isEqual:(GTReference *)reference {
167167#pragma mark -
168168#pragma mark Properties
169169
170+ - (BOOL )isBranch {
171+ return git_reference_is_branch (self.git_reference ) != 0 ;
172+ }
173+
174+ - (BOOL )isTag {
175+ return git_reference_is_tag (self.git_reference ) != 0 ;
176+ }
177+
170178- (BOOL )isRemote {
171179 return git_reference_is_remote (self.git_reference ) != 0 ;
172180}
You can’t perform that action at this time.
0 commit comments