Sha256: 89870013c121d26a00432e41f0226916484d4daff16e0201bef7f1afb142d23f

Contents?: true

Size: 610 Bytes

Versions: 92

Compression:

Stored size: 610 Bytes

Contents

# frozen_string_literal: true

# tau git check hg
module GitCheckHg
  # Backend method for git check hg.
  # @return [Boolean] are we on the git hg branch?
  def git_check_hg
    log.debug 'Check if we are on the git hg branch'

    return false unless git_check_workspace

    branch = _git_check_hg_get_branch
    log.debug "We are on git branch \"#{branch}\""

    branch == config.active['git_hg_branch']
  end

  private

  # Get git branch.
  def _git_check_hg_get_branch
    cmd_get_branch =
      config.active['cmd_git_check_hg_get_git_branch']
    (run cmd_get_branch).chomp.split('/')[-1]
  end
end

Version data entries

92 entries across 92 versions & 1 rubygems

Version Path
takeltau-0.42.0 lib/takeltau/git/check/hg.rb
takeltau-0.41.10 lib/takeltau/git/check/hg.rb
takeltau-0.41.9 lib/takeltau/git/check/hg.rb
takeltau-0.41.0 lib/takeltau/git/check/hg.rb
takeltau-0.40.11 lib/takeltau/git/check/hg.rb
takeltau-0.40.9 lib/takeltau/git/check/hg.rb
takeltau-0.40.7 lib/takeltau/git/check/hg.rb
takeltau-0.40.6 lib/takeltau/git/check/hg.rb
takeltau-0.40.4 lib/takeltau/git/check/hg.rb
takeltau-0.40.3 lib/takeltau/git/check/hg.rb
takeltau-0.40.1 lib/takeltau/git/check/hg.rb
takeltau-0.40.0 lib/takeltau/git/check/hg.rb
takeltau-0.39.18 lib/takeltau/git/check/hg.rb
takeltau-0.39.16 lib/takeltau/git/check/hg.rb
takeltau-0.39.11 lib/takeltau/git/check/hg.rb
takeltau-0.39.7 lib/takeltau/git/check/hg.rb
takeltau-0.39.2 lib/takeltau/git/check/hg.rb
takeltau-0.39.0 lib/takeltau/git/check/hg.rb
takeltau-0.38.2 lib/takeltau/git/check/hg.rb
takeltau-0.38.1 lib/takeltau/git/check/hg.rb