Skip to content

Conversation

@Sammy-T
Copy link
Contributor

@Sammy-T Sammy-T commented Oct 19, 2025

This helps to normalize how files and line endings are handled for contributors on various OSes.

Signed-off-by: Sammy-T <[email protected]>
@willnorris
Copy link
Member

are you actually running into problems with line endings on a particular editor or OS? A well-behaved editor should typically handle these things just fine. I don't really want to add a big attributes, particular for a bunch of file types we don't even have in this repo, if it's not really needed.

@Sammy-T
Copy link
Contributor Author

Sammy-T commented Oct 20, 2025

@willnorris I haven't had issues with this repo's files. Some contributions on other projects have conditioned me to consider it good practice but it isn't strictly necessary. And sorry, I got a bit overzealous with it. Are you not interested in it at all or would you prefer a bare minimum file?

@willnorris
Copy link
Member

We do have a pretty minimal one in the main tailcale repo: https://github.com/tailscale/tailscale/blob/main/.gitattributes, though the filter=go-mod seems to be a noop... maybe using an old go-mod tool that's not around anymore?

diff=golang doesn't seem to have any effect for me either... it seems that is already getting applied for go files (at least for me). Doesn't hurt to add that though. Setting the hunk-header for html and css does seem to make the diffs marginally better, so I guess adding those are fine as well?

@Sammy-T
Copy link
Contributor Author

Sammy-T commented Oct 20, 2025

Alright. Yeah, I'm not familiar with that filter=go-mod attribute either. But I can cut it down to the go, html, and css attributes with a * text=auto to handle detected text files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants