class Git::Status::Git::Status::StatusFile
Represents a single file’s status in the git repository. Each instance holds information about a file’s state in the index and working tree.
Attributes
Public Class Methods
Source
# File lib/git/status.rb, line 94 def initialize(base, hash) @base = base @path = hash[:path] @type = hash[:type] @stage = hash[:stage] @mode_index = hash[:mode_index] @mode_repo = hash[:mode_repo] @sha_index = hash[:sha_index] @sha_repo = hash[:sha_repo] @untracked = hash[:untracked] end
Public Instance Methods
Source
# File lib/git/status.rb, line 107 def blob(type = :index) sha = type == :repo ? sha_repo : (sha_index || sha_repo) @base.object(sha) if sha end
Returns a Git::Object::Blob for either the index or repo version of the file.