Module: GitCheckWorkspace

Overview

takelage git check workspace

Instance Method Summary collapse

Instance Method Details

#git_check_workspace(dir = _git_check_workspace_get_dir) ⇒ Boolean

Backend method for git check workspace.

Returns:

  • (Boolean)

    is this a git workspace?



7
8
9
10
11
12
13
14
15
# File 'lib/takelage/git/check/workspace.rb', line 7

def git_check_workspace(dir = _git_check_workspace_get_dir)
  log.debug "Check if \"#{dir}\" is a git workspace"
  status_repo = _git_check_workspace_get_status_repo(dir)
  unless status_repo.exitstatus.zero?
    log.debug "No git workspace found in \"#{dir}\""
    return false
  end
  true
end