Skip to content

Commit

Permalink
Show diff after commit with Git 1.6.1+. Closes #1.
Browse files Browse the repository at this point in the history
  • Loading branch information
henrik committed Sep 13, 2009
1 parent f3fc6f1 commit c4941c9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Support/lib/parsers.rb
Expand Up @@ -70,9 +70,14 @@ def parse_commit(commit_output)
result = {:output => ""}
commit_output.split("\n").each do |line|
case line
# Git <1.6.1: Created commit 9bd94be: commit msg
when /^ *Created commit ([a-f0-9]+): (.*)$/
result[:rev] = $1
result[:message] = $2
# Git 1.6.1+: [master 9bd94be] commit msg
when /^ *\[\S+ ([a-f0-9]+)\] (.*)$/
result[:rev] = $1
result[:message] = $2
when /^ *([0-9]+) files changed, ([0-9]+) insertions\(\+\), ([0-9]+) deletions\(\-\) *$/
result[:files_changed] = $1.to_i
result[:insertions] = $2.to_i
Expand Down

0 comments on commit c4941c9

Please sign in to comment.