Module: Retest::VersionControl::Git
- Defined in:
- lib/retest/version_control/git.rb
Class Method Summary collapse
- .diff_files(branch) ⇒ Object
- .files ⇒ Object
- .installed? ⇒ Boolean
- .name ⇒ Object
- .tracked_files ⇒ Object
- .untracked_files ⇒ Object
Class Method Details
.diff_files(branch) ⇒ Object
19 20 21 |
# File 'lib/retest/version_control/git.rb', line 19 def diff_files(branch) `git diff #{branch} --name-only --diff-filter=ACMRT -z`.split("\x0") end |
.files ⇒ Object
15 16 17 |
# File 'lib/retest/version_control/git.rb', line 15 def files (untracked_files + tracked_files).sort end |
.installed? ⇒ Boolean
7 8 9 |
# File 'lib/retest/version_control/git.rb', line 7 def installed? system "git -C . rev-parse 2>/dev/null" end |
.name ⇒ Object
11 12 13 |
# File 'lib/retest/version_control/git.rb', line 11 def name 'git' end |
.tracked_files ⇒ Object
27 28 29 |
# File 'lib/retest/version_control/git.rb', line 27 def tracked_files `git ls-files -z`.split("\x0") end |
.untracked_files ⇒ Object
23 24 25 |
# File 'lib/retest/version_control/git.rb', line 23 def untracked_files `git ls-files --other --exclude-standard -z`.split("\x0") end |