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.46.9 lib/takeltau/git/check/hg.rb
takeltau-0.46.8 lib/takeltau/git/check/hg.rb
takeltau-0.46.5 lib/takeltau/git/check/hg.rb
takeltau-0.46.1 lib/takeltau/git/check/hg.rb
takeltau-0.46.0 lib/takeltau/git/check/hg.rb
takeltau-0.45.27 lib/takeltau/git/check/hg.rb
takeltau-0.45.26 lib/takeltau/git/check/hg.rb
takeltau-0.45.24 lib/takeltau/git/check/hg.rb
takeltau-0.45.23 lib/takeltau/git/check/hg.rb
takeltau-0.45.22 lib/takeltau/git/check/hg.rb
takeltau-0.45.21 lib/takeltau/git/check/hg.rb
takeltau-0.45.19 lib/takeltau/git/check/hg.rb
takeltau-0.45.17 lib/takeltau/git/check/hg.rb
takeltau-0.45.16 lib/takeltau/git/check/hg.rb
takeltau-0.45.14 lib/takeltau/git/check/hg.rb
takeltau-0.45.13 lib/takeltau/git/check/hg.rb
takeltau-0.45.12 lib/takeltau/git/check/hg.rb
takeltau-0.45.11 lib/takeltau/git/check/hg.rb
takeltau-0.45.10 lib/takeltau/git/check/hg.rb
takeltau-0.45.9 lib/takeltau/git/check/hg.rb