Skip to content

RFC: create boolean functions for git status #346

Closed
@tarcinil

Description

@tarcinil

At present, we have changed, added, deleted, untracked methods but no boolean methods for checking the members of the Enumerable.

Example:

def changed
  @files.select { |k, f| f.type == 'M' }
end

Proposed:

def changed?(file)
  changed.member?(file)
end

This will allow interaction based on whether a file is changed as expected or not.

if changed?(file.rb)
  # start things
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions