ruby-git_diff_parser icon indicating copy to clipboard operation
ruby-git_diff_parser copied to clipboard

Fix how line numbers are counted in Patch#removed_lines

Open joroshiba opened this issue 8 years ago • 6 comments

Non removed lines should be counted towards the line number exclusively, test was simply incorrect previously. Manually checked against the diff to confirm this.

joroshiba avatar Feb 12 '18 21:02 joroshiba

I have a branch ready which adds upon this to add the data I originally wanted (a memoized function which gives us the lines which those deleted lines would reside out in new file), plus solving my need (a function which given a line from the current file, tells you which line it resided at in the old file, if it existed).

This work is dependent on this branch, I can either include it in this PR or wait for this one to go through and then open up the branch or fold it into this PR. I think they are seperate issues, but would like to see both go in, so waiting till this gets in for now.

joroshiba avatar Feb 13 '18 20:02 joroshiba

@sanemat

joroshiba avatar Mar 02 '18 19:03 joroshiba

Thanks, I'm in a vacation so after that I'll check this.

On Sat, Mar 3, 2018, 03:57 Jordan Oroshiba [email protected] wrote:

@sanemat https://github.com/sanemat

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/packsaddle/ruby-git_diff_parser/pull/183#issuecomment-370035440, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEmuJeqy4JlsalW_SBh0eJi_D_jqcvwks5taaQXgaJpZM4SC2N9 .

sanemat avatar Mar 03 '18 00:03 sanemat

What's the status of this PR?

Anything missing from the PR author? Or are we waiting for review?

sandstrom avatar Sep 30 '22 08:09 sandstrom

@sandstrom in all honesty, this is 4 years old and I should have done something 4 years ago. Other priorities, I had forked and moved on.

I think everyone can agree the behavior is better but I don't have the context really anymore on @cjoudrey to say whether or not those changes should be made, and I have no ability to merge. As far as I know the project I was working on which was pointing to my fork is still doing so, but I've moved on since then.

joroshiba avatar Oct 18 '22 22:10 joroshiba

@joroshiba Alright, just curious since we ran into this a few weeks ago 😄

Thanks for the update!

sandstrom avatar Oct 20 '22 11:10 sandstrom