<div dir="ltr">Two thoughts:<div>1. this is annoying and I wish it didn't do this</div><div>2. one workaround would be to always fetch v0 of the patch, and maintain/generate custom versions of the patches equivalent to each revision as needed.</div><div><br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">-- Dan Burton</div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, May 12, 2019 at 7:22 PM Niklas Hambüchen <<a href="mailto:mail@nh2.me">mail@nh2.me</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">I noticed that if you use Hackage's online Cabal file editor, it changes all your \n line endings to \r\n.<br>
<br>
This breaks all patches written against upstream .cabal files.<br>
<br>
For example, if I write a patch against `cachix-0.2.0` git repo's .cabal file, I can no longer apply it to whatever revisions of it Hackage has, even if there's no real conflict.<br>
<br>
Here's a reproduction (I changed only 1 line in the editor, and it shows the whole file as changed):<br>
<br>
    diff -u <(curl <a href="https://hackage.haskell.org/package/AesonBson-0.2.0/revision/0.cabal" rel="noreferrer" target="_blank">https://hackage.haskell.org/package/AesonBson-0.2.0/revision/0.cabal</a>) <(curl <a href="https://hackage.haskell.org/package/AesonBson-0.2.0/revision/1.cabal" rel="noreferrer" target="_blank">https://hackage.haskell.org/package/AesonBson-0.2.0/revision/1.cabal</a>)<br>
<br>
I found this especially problematic for nixpkgs, where patching packages is a common practice.<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>