Class: Turbulence::Scm::Git

Inherits:
Object
  • Object
show all
Defined in:
lib/turbulence/scm/git.rb

Class Method Summary collapse

Class Method Details

.is_repo?(directory) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
12
13
# File 'lib/turbulence/scm/git.rb', line 9

def is_repo?(directory)
  FileUtils.cd(directory) {
    return !(`git status 2>&1` =~ /Not a git repository/)
  }
end

.log_command(commit_range = "") ⇒ Object



5
6
7
# File 'lib/turbulence/scm/git.rb', line 5

def log_command(commit_range = "")
  `git log --all -M -C --numstat --format="%n" #{commit_range}`
end