git-delta 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/git-delta/reporter.rb +4 -2
- data/lib/git-delta/version.rb +1 -1
- metadata +3 -3
data/lib/git-delta/reporter.rb
CHANGED
@@ -50,7 +50,9 @@ module Git
|
|
50
50
|
def git_log
|
51
51
|
extra = Array(extra_args).join(' ')
|
52
52
|
extra << "--author=#{`git config user.email`.strip}" unless extra.include? '--author='
|
53
|
-
|
53
|
+
cmd = "git log --oneline --shortstat --no-merges #{extra} -- #{file_filter}"
|
54
|
+
# p cmd
|
55
|
+
`#{cmd}`
|
54
56
|
end
|
55
57
|
|
56
58
|
def file_filter
|
@@ -66,7 +68,7 @@ module Git
|
|
66
68
|
|
67
69
|
def self.parse_log(log)
|
68
70
|
log.lines.each_slice(2).map do |commit, changes|
|
69
|
-
_, plus, minus = *changes.match(/.*changed,\s*(\d+ insertions
|
71
|
+
_, plus, minus = *changes.match(/.*changed,\s*(\d+ insertions?\(\+\),?\s*)?(\d+ deletions?\(\-\))?/)
|
70
72
|
[commit.chomp, plus.to_i, -minus.to_i]
|
71
73
|
end
|
72
74
|
end
|
data/lib/git-delta/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-delta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-04-11 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Calculate the number of lines added/subtracted in a git directory
|
15
15
|
email:
|
@@ -51,7 +51,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
51
51
|
version: '0'
|
52
52
|
requirements: []
|
53
53
|
rubyforge_project:
|
54
|
-
rubygems_version: 1.8.
|
54
|
+
rubygems_version: 1.8.25
|
55
55
|
signing_key:
|
56
56
|
specification_version: 3
|
57
57
|
summary: Calculate the number of lines added/subtracted in a git directory
|