Discussion:
[mitk-users] Using shared MITK git repo between Linux and Windows
Nathan Lay
2017-04-18 16:03:39 UTC
Permalink
Hello again,
I made all my modifications of MITK on Linux and committed them into my
local git repository (cloned from your repository). Then I cloned my
repository onto Windows where I found that patch.exe crashes during the
build phase. Apparently this is due to CRLF issues. So, how do you work
around that without having to start over on a special non-versioned tarball
of the source code just for Windows? I would think that your .gitattributes
would have done the trick here. It looks pretty extensive.

Can I just do a find and run unix2dos on certain files? Which exactly? Just
the .cmake files or does patch run on anything else?

References:
https://www.mail-archive.com/mitk-***@lists.sourceforge.net/msg06562.html
https://www.mail-archive.com/mitk-***@lists.sourceforge.net/msg06427.html

Best regards,
Nathan Lay
Nathan Lay
2017-04-18 18:55:25 UTC
Permalink
Hello once again,
I've fixed this CRLF issue on Windows by changing a configuration in git.

Here's what I did:
git config --global core.autocrlf true

Then I re-cloned my MITK repository. But I thought .gitattributes overrides
these types of configurations. It shows that .cmake files ought not have
CRLF.

Out of curiosity, I'm guessing patch(1) is working with diff files that
expect CRLF? If that's the case, why do the MITK maintainers bother with
supporting CRLF? It's bound to be a headache sometimes for cross-platform
testing. I can see someone making changes on Linux in their clone of MITK,
then cloning/pulling their repository on Linux on Windows and having the
same problem.

Once again, I really appreciate the MITK platform you have all extensively
developed and documented (especially the latter!). I hope any criticisms I
might have don't rub off negatively. I'm only just an MITK newbie and
probably don't know any better.

Best regards,
Nathan Lay
Post by Nathan Lay
Hello again,
I made all my modifications of MITK on Linux and committed them into my
local git repository (cloned from your repository). Then I cloned my
repository onto Windows where I found that patch.exe crashes during the
build phase. Apparently this is due to CRLF issues. So, how do you work
around that without having to start over on a special non-versioned tarball
of the source code just for Windows? I would think that your .gitattributes
would have done the trick here. It looks pretty extensive.
Can I just do a find and run unix2dos on certain files? Which exactly?
Just the .cmake files or does patch run on anything else?
net/msg06562.html
net/msg06427.html
Best regards,
Nathan Lay
Dinkelacker, Stefan
2017-04-18 19:17:07 UTC
Permalink
Hi,


the CRLF vs. LF issue with patch.exe is a rather annoying one indeed. We use git with core.autocrlf = true, so "all" of our files have LF line endings in the repository, but CRLF when checking out on Windows. When creating tarballs you have to take special care. In fact we provide different tarballs for Windows and Linux for our releases because of this issue.


Best,

Stefan

________________________________
Von: Nathan Lay <***@gmail.com>
Gesendet: Dienstag, 18. April 2017 18:03
An: mitk-***@lists.sourceforge.net
Betreff: [mitk-users] Using shared MITK git repo between Linux and Windows

Hello again,
I made all my modifications of MITK on Linux and committed them into my local git repository (cloned from your repository). Then I cloned my repository onto Windows where I found that patch.exe crashes during the build phase. Apparently this is due to CRLF issues. So, how do you work around that without having to start over on a special non-versioned tarball of the source code just for Windows? I would think that your .gitattributes would have done the trick here. It looks pretty extensive.

Can I just do a find and run unix2dos on certain files? Which exactly? Just the .cmake files or does patch run on anything else?

References:
https://www.mail-archive.com/mitk-***@lists.sourceforge.net/msg06562.html
https://www.mail-archive.com/mitk-***@lists.sourceforge.net/msg06427.html

Best regards,
Nathan Lay

Loading...