Module: GitDiffLCS
- Defined in:
- lib/git_diff_lcs.rb,
lib/git_diff_lcs/cli.rb,
lib/git_diff_lcs/stat.rb,
lib/git_diff_lcs/version.rb
Overview
Git Diff LCS
Defined Under Namespace
Constant Summary collapse
- VERSION =
"0.0.6"
Class Method Summary collapse
-
.diff(repo, src, dest) ⇒ Object
Get diff summary with LCS algorithm.
Class Method Details
.diff(repo, src, dest) ⇒ Object
Get diff summary with LCS algorithm
Arguments:
[String] repo: repo git repository address
[String] src: src src commit or branch
[String] dest: dest commit or branch
Return:
[String] diff summary (changed files, insertions, deletions, modifications and total)
Example:
>> GitDiffLCS.diff("https://github.com/btpink-seo/git-diff-lcs.git", "test/src", "test/dest")
=> 5 files changed, 13 insertions(+), 6 deletions(-), 2 modifications(!), total(21)
22 23 24 25 |
# File 'lib/git_diff_lcs.rb', line 22 def self.diff(repo, src, dest) diff = GitDiffLCS::Stat.new(repo, src, dest) diff.errors.empty? ? diff.summary : diff.errors.first end |