Method: Rugged::Reference#type
- Defined in:
- ext/rugged/rugged_reference.c
#type ⇒ Object
Return whether the reference is :symbolic or :direct
173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
# File 'ext/rugged/rugged_reference.c', line 173 static VALUE rb_git_ref_type(VALUE self) { git_reference *ref; Data_Get_Struct(self, git_reference, ref); switch (git_reference_type(ref)) { case GIT_REF_OID: return CSTR2SYM("direct"); case GIT_REF_SYMBOLIC: return CSTR2SYM("symbolic"); default: return Qnil; } } |