Class: Suspect::FileTree::Git::Client
- Inherits:
-
Object
- Object
- Suspect::FileTree::Git::Client
- Defined in:
- lib/suspect/file_tree/git/client.rb
Instance Method Summary collapse
Instance Method Details
#branch ⇒ Object
5 6 7 |
# File 'lib/suspect/file_tree/git/client.rb', line 5 def branch `git rev-parse --abbrev-ref HEAD` end |
#commit_hash ⇒ Object
17 18 19 |
# File 'lib/suspect/file_tree/git/client.rb', line 17 def commit_hash `git log -1 --format="%H"` end |
#diff ⇒ Object
21 22 23 |
# File 'lib/suspect/file_tree/git/client.rb', line 21 def diff `git diff` end |
#files ⇒ Object
9 10 11 |
# File 'lib/suspect/file_tree/git/client.rb', line 9 def files `git ls-files --full-name` end |
#modified_files ⇒ Object
13 14 15 |
# File 'lib/suspect/file_tree/git/client.rb', line 13 def modified_files `git ls-files --full-name --modified` end |