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 267397 - Diff must take EOLs into account
Summary: Diff must take EOLs into account
Status: NEW
Alias: None
Product: utilities
Classification: Unclassified
Component: Diff (show other bugs)
Version: 8.2
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-02 09:10 UTC by terje7601
Modified: 2016-08-02 11:22 UTC (History)
0 users

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 2016-08-02 09:10:52 UTC
As the summary says: the Diff view must have an option to take EOLs into account.

For motivation, here's what I just did:
- open a file with Linux EOLs
- make a simple change & save the file (due to bug 262762 the EOLs have been changed to Windows EOLs at this point)
- do a git "Diff To HEAD" with NetBeans' diff view: everything looks perfect, just the few trivial changes are marked (and in the options I have all Diff-related options unchecked, so nothing is ignored)
- do a git commit & push... only to find out afterwards that git marked the whole file as changed, due to the changed EOLs. Needless to say this causes a lot of frustration.

Basically, I want to be able to configure NetBeans' Diff to work exactly the same as "git diff". In other words: it must be possible to mark "any" difference (another example being bug 250428).

Product Version: NetBeans IDE Dev (Build 201607110002)
Updates: Updates available
Java: 1.8.0_91; Java HotSpot(TM) 64-Bit Server VM 25.91-b15
Runtime: Java(TM) SE Runtime Environment 1.8.0_91-b15
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 1 Ondrej Vrabec 2016-08-02 09:17:07 UTC
You know, with Git on Windows, you should always setup core.autocrlf=true. If this was set, git commit would automatically convert CRLF back to Unix line-endings.
Comment 2 terje7601 2016-08-02 11:22:31 UTC
(In reply to Ondrej Vrabec from comment #1)
> You know, with Git on Windows, you should always setup core.autocrlf=true.
> If this was set, git commit would automatically convert CRLF back to Unix
> line-endings.

I don't want Git to do EOL handling (at least not with a rudimentary setting like core.autocrlf. Maybe with a .gitattributes file, but I don't have experience with that & not sure if NetBeans' git supports it anyway).

The problem is that NetBeans changes my EOLs unnoticed (bug 262762), and that the Diff view doesn't allow me to detect such unwanted changes (this issue).