Open ximion opened 6 years ago
Adding those files to Git will result in Git removing CRLF automatically
Depends on the git core.autocrlf
config. Most of these dmd-testsuite
files have these Windows or even mixed line endings because they are like that in the DMD git repo (and we have a script automating the update of our derived dmd-testsuite git submodule). The few LDC specific tests are a different matter of course.
So, should I report this to the DMD project directly?
I guess it won't hurt; I'm not sure whether we can fix it on our side without breaking the automation script. :/
Is core.autocrlf
enabled on the boxes used to prepare the Debian releases or somewhere in the automatic build chain? I'd discourage using it if you have a sensible editor (i.e. not Notepad on Windows), as it has always been more trouble than it is worth for me. Just leaving the sources as CRLF should work fine.
No, there is no core.autocrlf
anywhere (I didn't even know about it). The problem is that Git transparently removes CRLF, so the Git repo contains technically different sources than the release tarball. And that messes with git-buildpackage and dpkg when building packages.
Since the amount of files using CRLF is so incredibly small, I would guess fixing this once is much easier than (continuing to) apply workarounds.
FTR, this is reported as https://issues.dlang.org/show_bug.cgi?id=18027 to DMD now.
The problem is that Git transparently removes CRLF, so the Git repo contains technically different sources than the release tarball.
Which "Git" and where does the removing? To my knowledge, Git doesn't "transparently" mess with line endings, unless instructed to do so. core.autocrlf
is the setting that controls that. I don't think it is enabled by default.
the Git repo contains technically different sources than the release tarball
Which release tarball are you talking about? From your original post I got the impression that our source archives on the GitHub release page contain the mixed endings (correct), but they are normalized to LF somewhere on the Debian side (incorrect/problematic). But perhaps this was a misunderstanding?
FWIW, Debian's tools apparently enforce this setting: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=719363 This is highly annoying.
Hi! This has been messing with the Debian packaging for a while now, which is why I repackaged the release tarball every single time when adding LDC to Debian, removing CRLF from files. Adding those files to Git will result in Git removing CRLF automatically, resulting in a diff between the original tarball and our packaging sources in Git, which causes problems.
Since Git doesn't accept these files, I wonder how they appear at all in the release tarballs, and it would be neat to get this resolved in future.
Here is a list of the affected files:
Thanks! Matthias