Skip to content

RFC: create boolean functions for git status #346

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tarcinil opened this issue Feb 8, 2018 · 0 comments · Fixed by #348
Closed

RFC: create boolean functions for git status #346

tarcinil opened this issue Feb 8, 2018 · 0 comments · Fixed by #348

Comments

@tarcinil
Copy link
Contributor

tarcinil commented Feb 8, 2018

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
@tarcinil tarcinil changed the title create boolean functions for git status RFC: create boolean functions for git status Feb 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant