Method: Docman::GitUtil.commit

Defined in:
lib/docman/git_util.rb

.commit(root_path, path, message) ⇒ Object



52
53
54
55
56
57
58
59
# File 'lib/docman/git_util.rb', line 52

def self.commit(root_path, path, message)
  if repo_changed? path
    # puts message
    pull root_path
    exec %Q(git add --all #{path.slice "#{root_path}/"})
    exec %Q(git commit -m "#{message}")
  end
end