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 258598

Summary: Add options to git merge to ignore spaces and eol
Product: versioncontrol Reporter: -Silver-
Component: GitAssignee: Ondrej Vrabec <ovrabec>
Status: NEW ---    
Severity: normal CC: git
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Windows 7 x64   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: IDE log

Description -Silver- 2016-03-31 08:43:13 UTC
Product Version = NetBeans IDE 8.1 (Build 201510222201)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.8.0_66
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.66-b18

Reproducibility: Happens every time

Hi, 
with git merging two identical files that use different line ending can cause some problem. 
In those cases sometimes the two files are seen as completely different and it is like the entire content of the first is deleted and the entire content of the second is added.
To avoid this problem it is possible to run the merge from the command line using the options  -Xignore-space-at-eol
i.e.
git merge -s recursive -Xignore-space-at-eol

(for more details about the issue see this StackOverflow discussion: http://stackoverflow.com/questions/861995/is-it-possible-for-git-merge-to-ignore-line-ending-differences )


Unfortunately the merge command integrated into the netbeans git module doesn't provide this option. Should be nice to have a checkbox into the panel that appears when the merge operation is required to enable it. 
Would be even better (but probably more difficult to implement) to have a JTextField that allow to specify custom options when a git operation is performed.

Best regards,
Comment 1 -Silver- 2016-03-31 08:43:21 UTC
Created attachment 159056 [details]
IDE log