Sha256: 1d7a20044fcebdfbe426b1d2c5fc037b5f09e5149d5258de7b84d8e72e0d4990

Contents?: true

Size: 435 Bytes

Versions: 4

Compression:

Stored size: 435 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

4 entries across 4 versions & 1 rubygems

Version Path
git_wrapper-1.1.2 lib/git_wrapper/commands/diff.rb
git_wrapper-1.1.1 lib/git_wrapper/commands/diff.rb
git_wrapper-1.1.0 lib/git_wrapper/commands/diff.rb
git_wrapper-1.0.3 lib/git_wrapper/commands/diff.rb