Sha256: ba7de6a1bbce4bc88abb36da916fe16fae50f3b4b3a3ce9f85967fca674238b8
Contents?: true
Size: 871 Bytes
Versions: 1
Compression:
Stored size: 871 Bytes
Contents
# encoding: utf-8 module Git class Command def self.diff_tree(new) runner = Runner.new("git diff-tree -r --root #{new}") runner.result end def self.diff(old, new) runner = Runner.new("git diff --raw #{old} #{new}") runner.result end def self.init(path) runner = Git::Runner.new("git init #{path}") runner.result end def self.add(object) runner = Git::Runner.new("git add #{object}") runner.result end def self.status runner = Git::Runner.new('git status') runner.result end def self.commit(message) runner = Git::Runner.new("git commit -m \"#{message}\"") runner.result end def self.show(sha = nil) cmd = ['git show'] cmd << " #{sha}" if sha runner = Git::Runner.new(cmd.join(" ")) runner.result end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
git_hook-pre_receive-0.0.2 | lib/git_hook-pre_receive/command.rb |