Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing lines in Parallel Diff #6799

Merged
merged 1 commit into from
May 6, 2014
Merged

Fix missing lines in Parallel Diff #6799

merged 1 commit into from
May 6, 2014

Conversation

GeorgeDewar
Copy link
Contributor

A user of Gitlab here has noticed that the Parallel Diff feature chops a bunch of lines off the end of a file. This issue predates the recent changes to this feature - it affects the current version of Gitlab and can be observed on demo.gitlab.com.

We have deduced that what is happening is that a line count that removes empty lines is being used, and so for every empty (or whitespace, I imagine) line in the file, a line off the end is not shown.

This PR seems to resolve the problem by using the loc method instead of the sloc method. It also correctly calculates the maximum length of the two files, avoiding another issue where unnecessary lines are appended to the end of the diff output if the lengths of the files differ.

@jvanbaarsen
Copy link
Contributor

@randx Looks good!

dzaporozhets added a commit that referenced this pull request May 6, 2014
@dzaporozhets dzaporozhets merged commit 5ce1418 into gitlabhq:master May 6, 2014
@jvanbaarsen
Copy link
Contributor

@GeorgeDewar Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants