Sha256: c8abca7a29a4a0214bbadca99a59235088f3767a7e2725b31c06334ba53d70dc

Contents?: true

Size: 503 Bytes

Versions: 2

Compression:

Stored size: 503 Bytes

Contents

module GitWrapper
  module Results
    module FileStatus
      STATUSES = {
          'A' => :new_file,
          'M' => :modified,
          'D' => :deleted,
          'R' => :renamed,
          'UU' => :merge_conflict,
          'AA' => :merge_conflict,
          'C' => :copied,
          'T' => :type_changed,
          'X' => :unknown
      }

      def self.value_of(char)
        return :untracked unless STATUSES.key?(char)
        STATUSES[char]
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
git_wrapper-1.0.2 lib/git_wrapper/results/file_status.rb
git_wrapper-1.0.1 lib/git_wrapper/results/file_status.rb