get_git_state Function

function get_git_state()

Return "-dirty" if the repository has modifications to tracked files, or the empty string otherwise

Arguments

None

Return Value character(len=:), allocatable


Contents

Source Code


Source Code

function get_git_state()
  implicit none
  character(:), allocatable :: get_git_state

  if (GIT_STATE == "clean") then
    get_git_state = ""
  else
    get_git_state = "-dirty"
  endif
end function get_git_state