Parse git descriptor identifier from a string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | name |
pure integer function parse_descriptor(name) character(len=*), intent(in) :: name select case (name) case ("default"); parse_descriptor = git_descriptor%default case ("branch"); parse_descriptor = git_descriptor%branch case ("tag"); parse_descriptor = git_descriptor%tag case ("revision"); parse_descriptor = git_descriptor%revision case default; parse_descriptor = git_descriptor%error end select end function parse_descriptor