def config(key, dir = Dir.pwd, options = {})
      #info "Retrieve the Git configuration"
      res = nil
      if (options[:list] || (key.is_a? Regexp) || (key =~ /\*/))
        cg  = MiniGit::Capturing.new(dir)
        res = (cg.config :list => true).split("\n")
        res.select! { |e| e.match(/^#{key}/) } unless key == '*'
        #res = res.map { |e| e.split('=') }.to_h if options[:hash]
        res = Hash[ res.map { |e| e.split('=') } ] if options[:hash]
      else
        g = MiniGit.new(dir)
        res = g[key]
        res = { key => g[key] } if options[:hash]
      end
      #ap res
      res
    end
def config(key, dir = Dir.pwd, options = {})
      #info "Retrieve the Git configuration"
      res = nil
      if (options[:list] || (key.is_a? Regexp) || (key =~ /\*/))
        cg  = MiniGit::Capturing.new(dir)
        res = (cg.config :list => true).split("\n")
        res.select! { |e| e.match(/^#{key}/) } unless key == '*'
        #res = res.map { |e| e.split('=') }.to_h if options[:hash]
        res = Hash[ res.map { |e| e.split('=') } ] if options[:hash]
      else
        g = MiniGit.new(dir)
        res = g[key]
        res = { key => g[key] } if options[:hash]
      end
      #ap res
      res
    end
config 
 Retrieve the Git configuration
 You can propose a pattern as key
 Supported options:
  * :list [boolean] list all configurations
  * :hash [boolean] return a Hash