Class: Repository::Status
- Inherits:
-
Object
- Object
- Repository::Status
- Defined in:
- lib/repository/status.rb
Instance Attribute Summary collapse
-
#changed ⇒ Object
readonly
Returns the value of attribute changed.
-
#conflicts ⇒ Object
readonly
Returns the value of attribute conflicts.
-
#head_tree ⇒ Object
readonly
Returns the value of attribute head_tree.
-
#index_changes ⇒ Object
readonly
Returns the value of attribute index_changes.
-
#stats ⇒ Object
readonly
Returns the value of attribute stats.
-
#untracked_files ⇒ Object
readonly
Returns the value of attribute untracked_files.
-
#workspace_changes ⇒ Object
readonly
Returns the value of attribute workspace_changes.
Instance Method Summary collapse
-
#initialize(repository, commit_oid = nil) ⇒ Status
constructor
A new instance of Status.
Constructor Details
#initialize(repository, commit_oid = nil) ⇒ Status
Returns a new instance of Status.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/repository/status.rb', line 17 def initialize(repository, commit_oid = nil) @repo = repository @stats = {} @inspector = Inspector.new(@repo) @changed = SortedSet.new @index_changes = SortedHash.new @conflicts = SortedHash.new @workspace_changes = SortedHash.new @untracked_files = SortedSet.new commit_oid ||= @repo.refs.read_head @head_tree = @repo.database.load_tree_list(commit_oid) scan_workspace check_index_entries collect_deleted_head_files end |
Instance Attribute Details
#changed ⇒ Object (readonly)
Returns the value of attribute changed.
9 10 11 |
# File 'lib/repository/status.rb', line 9 def changed @changed end |
#conflicts ⇒ Object (readonly)
Returns the value of attribute conflicts.
9 10 11 |
# File 'lib/repository/status.rb', line 9 def conflicts @conflicts end |
#head_tree ⇒ Object (readonly)
Returns the value of attribute head_tree.
9 10 11 |
# File 'lib/repository/status.rb', line 9 def head_tree @head_tree end |
#index_changes ⇒ Object (readonly)
Returns the value of attribute index_changes.
9 10 11 |
# File 'lib/repository/status.rb', line 9 def index_changes @index_changes end |
#stats ⇒ Object (readonly)
Returns the value of attribute stats.
9 10 11 |
# File 'lib/repository/status.rb', line 9 def stats @stats end |
#untracked_files ⇒ Object (readonly)
Returns the value of attribute untracked_files.
9 10 11 |
# File 'lib/repository/status.rb', line 9 def untracked_files @untracked_files end |
#workspace_changes ⇒ Object (readonly)
Returns the value of attribute workspace_changes.
9 10 11 |
# File 'lib/repository/status.rb', line 9 def workspace_changes @workspace_changes end |