Sha256: 35adac832516c84158e56bc553dd9b6848bb4f903bf571403db6ac3ba5096a39

Contents?: true

Size: 513 Bytes

Versions: 34

Compression:

Stored size: 513 Bytes

Contents

require 'pre-commit/utils/git_conversions'

module PreCommit
  class Configuration
    class Providers

      class Git
        include PreCommit::Utils::GitConversions

        def self.priority
          10
        end

        def [](name)
          git_to_ruby(`git config pre-commit.#{name.to_s.gsub(/_/,".")} 2>/dev/null`)
        end

        def update(name, value)
          `git config pre-commit.#{name.to_s.gsub(/_/,".")} "#{ruby_to_git(value)}" 2>/dev/null`
        end

      end

    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
pre-commit-0.22.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.21.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.20.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.19.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.18.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.17.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.16.3 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.16.2 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.16.1 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.16.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.15.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.14.1 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.14.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.13.0 lib/plugins/pre_commit/configuration/providers/git.rb