[PATCH v2 37/44] ruby: request-pull: use shortlog()
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
git-request-pull.rb | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/git-request-pull.rb b/git-request-pull.rb
index 233981f..0db64c3 100755
--- a/git-request-pull.rb
+++ b/git-request-pull.rb
@@ -79,6 +79,11 @@ def parse_buffer(buffer)
return [summary, date]
end
+def show_shortlog(base, head)
+ rev = Git::RevInfo.setup(nil, ['^' + base, head], nil)
+ shortlog(rev.to_a)
+end
+
until ARGV.empty?
case ARGV.first
when '-p'
@@ -174,7 +179,7 @@ for you to fetch changes up to %s:
puts "----------------------------------------------------------------"
end
- run(%[git shortlog ^#{base} #{head}])
+ show_shortlog(base, head)
run(%[git diff -M --stat --summary #{patch} ^#{merge_base_commit} #{head}])
if ! ref
--
1.8.4-fc