Sha256: 21ff5ec9d959f19ca5b6743dfcbe187b5f77d8b2f4b6ede98aead94cada47c19

Contents?: true

Size: 462 Bytes

Versions: 3

Compression:

Stored size: 462 Bytes

Contents

module GitWrapper
  module Commands
    class Diff < Git

      def with(commit)
        @commit = commit
        self
      end

      def reverse
        @reverse = true
        self
      end

      def command
        "diff #{@commit}#{@reverse ? ' -R ' : ''} --name-status"
      end

      def result
        output.split(/\n/).map do |line|
          Results::DiffNameStatus.parse(line)
        end
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
git_wrapper-1.0.2 lib/git_wrapper/commands/diff.rb
git_wrapper-1.0.1 lib/git_wrapper/commands/diff.rb
git_wrapper-1.0.0 lib/git_wrapper/commands/diff.rb