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

New lines wrongly marked as changed #8

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

New lines wrongly marked as changed #8

benhoskings opened this issue Dec 12, 2012 · 3 comments

Comments

@benhoskings
Copy link

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

@jisaacks
Copy link
Owner

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.

@benhoskings
Copy link
Author

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//issues/8#issuecomment-11317247.

Cheers
Ben

@jisaacks
Copy link
Owner

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

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

No branches or pull requests

2 participants