Module: D2::Helpers::Git

Defined in:
lib/d2/helpers/git.rb,
lib/d2/helpers/git/local_repo.rb

Defined Under Namespace

Classes: LocalRepo

Class Method Summary collapse

Class Method Details

.configHash

Returns a hash representation of the current git config

Returns:

  • (Hash)

    hash representing the git config



9
10
11
12
13
14
# File 'lib/d2/helpers/git.rb', line 9

def self.config
  config, _ = CLI::Kit::System.capture2e('git config --list')
  ini = CLI::Kit::Ini.new
  ini.instance_variable_set(:@config, config.lines) # TODO: Add support
  ini.parse
end