<div dir="ltr">The main problem being that if they're using basic web upload for the file, it's using network CRLF.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 14, 2019 at 7:05 AM Peter Simons <<a href="mailto:simons@nospf.cryp.to">simons@nospf.cryp.to</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi guys,<br>
<br>
 > The diff program has an option to --ignore-trailing-space<br>
 > (-Z for short) that will totally ignore changes of `\n`<br>
 > to `\n\r` and vice versa. And so you will see only<br>
 > 'actual' changes.<br>
<br>
more importantly, patch(1) has an option --ignore-whitespace<br>
that helps applying patches to a revised Cabal file which<br>
suddenly comes along with CRLF line endings. Using that flag<br>
with diff(1) when creating the patch is a good idea, but it<br>
won't make the patch resistant against failures when it's<br>
applied to a modified Cabal file.<br>
<br>
 > Another generally useful option is --ignore-space-change<br>
 > (-b for short) that will ignore indentation changes.<br>
 > Another option that you may use is --ignore-all-space.<br>
<br>
This option is actually somewhat dangerous when applied in<br>
cases where the underlying source relies on layout to convey<br>
structure, because changes in indention will be lost with<br>
that flag enabled.<br>
<br>
Generally speaking, Hackage's policy of adding CRLFs to<br>
edited files seems like a bad idea. The least intrusive<br>
choice would be to follow whatever line-ending convention<br>
the original Cabal file has and to adhere to that.<br>
<br>
Anyway, I'll throw in a historical footnote for good<br>
measure: [1]<br>
<br>
Best regards,<br>
Peter<br>
<br>
<br>
[1] <a href="https://github.com/commercialhaskell/all-cabal-files/issues/11" rel="noreferrer" target="_blank">https://github.com/commercialhaskell/all-cabal-files/issues/11</a><br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>brandon s allbery kf8nh</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a></div></div></div></div></div>