Skip to content
This repository has been archived by the owner on May 8, 2018. It is now read-only.

Commit

Permalink
undo some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
zoltan committed Nov 6, 2008
1 parent 32fae36 commit 8820d5f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions git_commit_notifier/lib/diff_to_html.rb
Expand Up @@ -38,7 +38,7 @@ def add_line_to_result(line, escape)
klass = line_class(line)
content = escape ? escape_content(line[:content]) : line[:content]
padding = ' ' if klass != ''
@diff_result += "<tr#{klass}>\n<td class=\"ln\">#{line[:removed]}</td>\n<td class=\"ln\">#{line[:added]}</td>\n<td>#{padding}#{content}</td></tr>\n"
@diff_result << "<tr#{klass}>\n<td class=\"ln\">#{line[:removed]}</td>\n<td class=\"ln\">#{line[:added]}</td>\n<td>#{padding}#{content}</td></tr>"
end

def extract_block_content(block)
Expand Down Expand Up @@ -109,8 +109,8 @@ def operation_description

def add_changes_to_result
return if @current_file_name.nil?
@diff_result += operation_description
@diff_result += '<table>'
@diff_result << operation_description
@diff_result << '<table>'
unless @diff_lines.empty?
removals = []
additions = []
Expand All @@ -131,7 +131,7 @@ def add_changes_to_result
end
end
@diff_lines = []
@diff_result +='</table>'
@diff_result << '</table>'
end
# reset values
@right_ln = nil
Expand All @@ -144,7 +144,7 @@ def add_changes_to_result
def diff_for_revision(content)
@left_ln = @right_ln = nil

@diff_result = ""
@diff_result = []
@diff_lines = []
@removed_files = []
@current_file_name = nil
Expand All @@ -161,7 +161,7 @@ def diff_for_revision(content)
@left_ln.nil? || op == '@' ? process_info_line(line, op) : process_code_line(line, op)
end
add_changes_to_result
@diff_result
@diff_result.join("\n")
end

def process_code_line(line, op)
Expand Down
2 changes: 1 addition & 1 deletion git_commit_notifier/lib/git.rb
@@ -1,6 +1,6 @@
class Git
def self.show(rev)
`git show #{rev} -w`
`git show #{rev.strip} -w`
end

def self.log(rev1, rev2)
Expand Down

0 comments on commit 8820d5f

Please sign in to comment.