parse_descriptor Function

public pure function parse_descriptor(name)

Parse git descriptor identifier from a string

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

Return Value integer


Source Code

    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