Sha256: 2e1b8874363bc9a41e7d54db769a4257d3d3ab7d6ecae785cd5a021e89d404c0

Contents?: true

Size: 357 Bytes

Versions: 28

Compression:

Stored size: 357 Bytes

Contents

# frozen_string_literal: true

module Overcommit::Hook::PreCommit
  # Checks for unresolved merge conflicts
  class MergeConflicts < Base
    def run
      result = execute(command, args: applicable_files)

      unless result.stdout.empty?
        return :fail, "Merge conflict markers detected:\n#{result.stdout}"
      end

      :pass
    end
  end
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
overcommit-0.64.1 lib/overcommit/hook/pre_commit/merge_conflicts.rb
overcommit-0.64.0 lib/overcommit/hook/pre_commit/merge_conflicts.rb
overcommit-0.63.0 lib/overcommit/hook/pre_commit/merge_conflicts.rb
overcommit-0.62.0 lib/overcommit/hook/pre_commit/merge_conflicts.rb
overcommit-0.61.0 lib/overcommit/hook/pre_commit/merge_conflicts.rb
overcommit-0.60.0 lib/overcommit/hook/pre_commit/merge_conflicts.rb
overcommit-0.59.1 lib/overcommit/hook/pre_commit/merge_conflicts.rb
overcommit-0.59.0 lib/overcommit/hook/pre_commit/merge_conflicts.rb
overcommit-jeygeethanmedia-0.58.0 lib/overcommit/hook/pre_commit/merge_conflicts.rb
overcommit-0.58.0 lib/overcommit/hook/pre_commit/merge_conflicts.rb
overcommit-0.57.0 lib/overcommit/hook/pre_commit/merge_conflicts.rb
overcommit-0.56.0 lib/overcommit/hook/pre_commit/merge_conflicts.rb
overcommit-0.55.0 lib/overcommit/hook/pre_commit/merge_conflicts.rb
overcommit-0.54.1 lib/overcommit/hook/pre_commit/merge_conflicts.rb
overcommit-0.54.0 lib/overcommit/hook/pre_commit/merge_conflicts.rb
overcommit-jeygeethanmedia-0.53.1.2 lib/overcommit/hook/pre_commit/merge_conflicts.rb
overcommit-jeygeethanmedia-0.53.1.1 lib/overcommit/hook/pre_commit/merge_conflicts.rb
overcommit-jeygeethanmedia-0.53.1 lib/overcommit/hook/pre_commit/merge_conflicts.rb
overcommit-0.53.0 lib/overcommit/hook/pre_commit/merge_conflicts.rb
overcommit-0.52.1 lib/overcommit/hook/pre_commit/merge_conflicts.rb