descriptor_name Function

public pure function descriptor_name(descriptor) result(name)

Code git descriptor to a string

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: descriptor

Return Value character(len=:), allocatable


Source Code

    pure function descriptor_name(descriptor) result(name)
       integer, intent(in) :: descriptor
       character(len=:), allocatable :: name

       select case (descriptor)
          case (git_descriptor%default);   name = "default"
          case (git_descriptor%branch);    name = "branch"
          case (git_descriptor%tag);       name = "tag"
          case (git_descriptor%revision);  name = "revision"
          case default;                    name = "ERROR"
       end select

    end function descriptor_name