Sha256: 63c2b740a4d4488ed57ced66d6b1d769b646fecac5d98c89be943e1a1fa77d8f

Contents?: true

Size: 615 Bytes

Versions: 3

Compression:

Stored size: 615 Bytes

Contents

module GitWrapper
  module Commands
    class Show < Git

      def file(file_name)
        @file = to_relative_path(file_name)
        self
      end

      def commit(commit)
        @version = "#{commit}:"
        self
      end

      def base
        @version = ':1:'
        self
      end

      def mine
        @version = ':2:'
        self
      end

      def theirs
        @version = ':3:'
        self
      end

      def command
        "show #{@version ? @version : 'HEAD:'}\"#{@file}\""
      end

      def result
        output
      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/show.rb
git_wrapper-1.0.1 lib/git_wrapper/commands/show.rb
git_wrapper-1.0.0 lib/git_wrapper/commands/show.rb