Module: Hooks::Git::Default

Defined in:
lib/hooks/git_hooks.rb

Class Method Summary collapse

Class Method Details

.fetch(local_reponame, remotename, branchname) ⇒ Object



6
7
8
9
10
# File 'lib/hooks/git_hooks.rb', line 6

def self.fetch(local_reponame, remotename, branchname)
  Dir.chdir(File.expand_path(local_reponame)) do
    ::Kernel.system("git fetch #{remotename} #{branchname}")
  end
end

.pull(local_reponame, remotename, branchname) ⇒ Object



12
13
14
15
16
# File 'lib/hooks/git_hooks.rb', line 12

def self.pull(local_reponame, remotename, branchname)
  Dir.chdir(File.expand_path(local_reponame)) do
    ::Kernel.system("git pull #{remotename} #{branchname}")
  end
end