Class: Rdm::Git::DiffCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/rdm/git/diff_command.rb

Class Method Summary collapse

Class Method Details

.get_only_diff_filenames(revision:, path:) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/rdm/git/diff_command.rb', line 3

def get_only_diff_filenames(revision:, path:)
  command = `cd #{path} && git diff --name-only #{revision}`

  raise Rdm::Errors::GitCommandError, command unless $?.success?

  command.split("\n")
end