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.40.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.39.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.38.1 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.38.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.37.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.36.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.35.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.34.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.33.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.32.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.31.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.30.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.29.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.28.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.27.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.26.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.25.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.24.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.23.0 lib/plugins/pre_commit/configuration/providers/git.rb
pre-commit-0.22.1 lib/plugins/pre_commit/configuration/providers/git.rb