Class: RGitHook::Git
- Inherits:
-
Object
- Object
- RGitHook::Git
- Defined in:
- lib/rgithook/git.rb
Class Method Summary collapse
- .cat_file(sha1) ⇒ Object
- .config(config_file) ⇒ Object
- .diff_numstat(sha1) ⇒ Object
- .diff_path(sha1, path) ⇒ Object
- .rev_list(rev_old, rev_new) ⇒ Object
Class Method Details
.cat_file(sha1) ⇒ Object
11 12 13 |
# File 'lib/rgithook/git.rb', line 11 def self.cat_file(sha1) %x(git cat-file -p #{sha1}) end |
.config(config_file) ⇒ Object
7 8 9 |
# File 'lib/rgithook/git.rb', line 7 def self.config(config_file) %x(git config #{config_file}) end |
.diff_numstat(sha1) ⇒ Object
15 16 17 |
# File 'lib/rgithook/git.rb', line 15 def self.diff_numstat(sha1) %x(git diff #{sha1}^ #{sha1} --numstat) end |
.diff_path(sha1, path) ⇒ Object
19 20 21 |
# File 'lib/rgithook/git.rb', line 19 def self.diff_path(sha1, path) %x(git diff #{sha1}^ #{sha1} -- #{path}) end |
.rev_list(rev_old, rev_new) ⇒ Object
3 4 5 |
# File 'lib/rgithook/git.rb', line 3 def self.rev_list(rev_old, rev_new) %x(git rev-list #{rev_old}..#{rev_new}) end |