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 - Add options to git merge to ignore spaces and eol
Summary: Add options to git merge to ignore spaces and eol
Status: NEW
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Git (show other bugs)
Version: 8.1
Hardware: PC Windows 7 x64
: P3 normal (vote)
Assignee: Ondrej Vrabec
Depends on:
Reported: 2016-03-31 08:43 UTC by -Silver-
Modified: 2016-03-31 08:43 UTC (History)
1 user (show)

See Also:
Exception Reporter:

IDE log (87.83 KB, text/plain)
2016-03-31 08:43 UTC, -Silver-

Note You need to log in before you can comment on or make changes to this bug.
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

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
git merge -s recursive -Xignore-space-at-eol

(for more details about the issue see this StackOverflow discussion: )

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