janusgraph-docker icon indicating copy to clipboard operation
janusgraph-docker copied to clipboard

prevent LF from being replaced by CRLF

Open phreed opened this issue 4 years ago • 5 comments

Windows 10 tends to insert CRLF which causes problems for docker. The .gitattributes has options for addressing this problem. https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes

phreed avatar Apr 20 '21 16:04 phreed

@phreed — please add a license header to the file (see the .editorconfig file for an example, and update the year if needed) and add a DCO sign-off

mbrukman avatar Apr 20 '21 16:04 mbrukman

@phreed — please squash your commits and add a DCO sign-off to the single squashed commit. See the link in my earlier comment for how to add the DCO sign-off and make it easy to add automatically for future commits via an alias.

mbrukman avatar Apr 20 '21 16:04 mbrukman

@phreed Isn't that config you should set globally for your local env?

We are already enforce lf using editorconfig.

farodin91 avatar Apr 20 '21 17:04 farodin91

@farodin91 — I was thinking along the same lines, but .editorconfig only takes effect if someone installs the EditorConfig plugin for their editor, and if not, at least .gitattributes will also kick in as a last resort option. I've seen a number of repos which check in their .gitattributes files in their trees, so I think it's not out of the norm to do this.

https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes says:

Some of these settings can also be specified for a path, so that Git applies those settings only for a subdirectory or subset of files. These path-specific settings are called Git attributes and are set either in a .gitattributes file in one of your directories (normally the root of your project) or in the .git/info/attributes file if you don’t want the attributes file committed with your project.

which suggests that this is a reasonable way of doing this if you intend to share these settings. Thoughts?

mbrukman avatar Apr 20 '21 18:04 mbrukman

From my side we can add such a .gitattributes for the reasons @mbrukman described.

But DCO is still missing:

please squash your commits and add a DCO sign-off to the single squashed commit. See the link in my earlier comment for how to add the DCO sign-off and make it easy to add automatically for future commits via an alias.

@phreed: Do you want to come back to this and update your branch accordingly?

FlorianHockmann avatar Jun 16 '22 09:06 FlorianHockmann

Closing this for lack of activity. @phreed: Feel free to recreate this.

FlorianHockmann avatar Jan 11 '23 10:01 FlorianHockmann