New lines wrongly marked as changed #8

Closed
benhoskings opened this Issue Dec 12, 2012 · 3 comments

Comments

Projects
None yet
2 participants

Hi, thanks for GitGutter, I'm impressed with how responsive it is.

There's an issue with the diffs on my machine where new lines show up as changed if an adjacent line is also changed.

For example, if I insert to lines with no other changes, then things look right (I need to tweak the colour):

http://d.pr/mZKy

But then if I change an adjacent line, those new ones are also shown as 'changed':

http://d.pr/sAea

Owner

jisaacks commented Dec 13, 2012

I am using the unix diff tool to determine the changes against the repo at HEAD. I believe that is just how unix diff treats changes, if new lines are touching modified lines, they are all treated as a single modified code block.

Ahh, right you are. I wasn't thinking in terms of a diff :)

I experimented with diff -y, which does distinguish between changed and
inserted lines, but its output would be harder to parse. (Even if it
weren't in two columns, which makes it unfeasible.) I also checked out
line-format and group-format, which looked promising but ultimately I don't
think it's worth pursuing.

In the end, the diff is generated by comparing old and new equally, and so
is never going to produce what might be the most logical description of
just the new, non-diff lines.

Cheers,
Ben

On 13 December 2012 11:40, JD Isaacks notifications@github.com wrote:

I am using the unix diff tool to determine the changes against the repo at
HEAD. I believe that is just how unix diff treats changes, if new lines are
touching modified lines, they are all treated as a single modified code
block.


Reply to this email directly or view it on GitHubhttps://github.com/jisaacks/GitGutter/issues/8#issuecomment-11317247.

Cheers
Ben

Owner

jisaacks commented Jan 30, 2013

Cool, I am going to go ahead and close this issue then.

jisaacks closed this Jan 30, 2013

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