diff options
author | George Dewar <george.dewar@datacom.co.nz> | 2014-04-17 14:36:43 +1200 |
---|---|---|
committer | George Dewar <george.dewar@datacom.co.nz> | 2014-04-17 14:42:05 +1200 |
commit | 5ef7fdbd54ef41de01b64b4df58529d4bf3c62a3 (patch) | |
tree | 4d9f3729eef67401e19779820129609b868f8cb8 /app/helpers/commits_helper.rb | |
parent | 9b52affe31f2496fb10ae1d90b21f42ed173b7dc (diff) | |
download | gitlab-ce-5ef7fdbd54ef41de01b64b4df58529d4bf3c62a3.tar.gz |
Fix bug in which a line count without empty lines was incorrectly used
Diffstat (limited to 'app/helpers/commits_helper.rb')
-rw-r--r-- | app/helpers/commits_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb index c6e4f574b67..b02be4623fd 100644 --- a/app/helpers/commits_helper.rb +++ b/app/helpers/commits_helper.rb @@ -116,7 +116,7 @@ module CommitsHelper added_lines[line_new] = { line_code: line_code, type: type, line: line } end end - max_length = old_file ? old_file.sloc + added_lines.length : file.sloc + max_length = old_file ? [old_file.loc, file.loc].max : file.loc offset1 = 0 offset2 = 0 |