This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 250428 - Diff is unable to distinguish trailing newline
Summary: Diff is unable to distinguish trailing newline
Status: NEW
Alias: None
Product: utilities
Classification: Unclassified
Component: Diff (show other bugs)
Version: 8.0.2
Hardware: PC Other
: P3 normal with 1 vote (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-15 07:29 UTC by terje7601
Modified: 2016-05-23 19:08 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description terje7601 2015-02-15 07:29:14 UTC
To reproduce, create a new project with the following 4 files:
none.txt = ""
unix.txt = "\n"
windows.txt = "\r\n"
mac.txt = "\r"

Diff considers all 4 files equal (0/0 differences). In my opinion, when "Ignore Leading And Trailing Whitespace" is unchecked in the Diff options, this case should be detected.

If you add the above files to a Git repository & then rename the files (none.txt becomes unix.txt, unix.txt becomes windows.txt, ...), git will show all 4 files have changed, but when doing "Diff to HEAD" NetBeans says there are no differences. In my opinion, this is confusing at least.