←back to thread

Jujutsu for everyone

(jj-for-everyone.github.io)
434 points Bogdanp | 2 comments | | HN request time: 0.465s | source
Show context
layer8 ◴[] No.45084800[source]
One showstopper for me is that Jujutsu doesn’t support .gitattributes (https://jj-vcs.github.io/jj/latest/git-compatibility/).
replies(3): >>45085384 #>>45085408 #>>45087806 #
odie5533 ◴[] No.45087806[source]
.gitattributes has only caused me trouble, so I wouldn't really miss it. IMO it's a footgun.
replies(1): >>45092573 #
layer8 ◴[] No.45092573[source]
It's the only way to ensure proper cross-platform EOL handling when you can't rely on users configuring their local Git appropriately.

Of course, it also requires users to use the official Git client, so that .gitattributes are actually observed. But that's more likely to be the case in practice.

replies(1): >>45094870 #
sunshowers ◴[] No.45094870[source]
The correct way to do cross-platform EOL handling is to use LF for all files on all platforms, and enforce that via hooks or CI. Every program on Windows, including the humble Notepad, understands LF these days.

Git for Windows configures core.autocrlf to true by default. This is a terrible idea, imho. "input" is a bit more justifiable.

replies(1): >>45095441 #
1. layer8 ◴[] No.45095441[source]
If you have to deploy or test with CRLF files, you can’t force LF for all files. This isn’t about editors, but about files to be deployed on customer systems, and/or to be used in tests, where the interfacing software has other requirements. You also have to use .gitattributes to reliably define which files to treat as text files in the first place. And you’d have to define your hooks and CI checks to be consistent with that. Note that Git always converts CRLF to LF upon check-in for defined-to-be-text files, even on Unix.

I agree that the default on Windows is wrong. “Input” isn’t much better.

replies(1): >>45095657 #
2. sunshowers ◴[] No.45095657[source]
Tests that require CRLF should transform files as appropriate within a temporary directory. That way the costs of non-standard line endings are borne by the places that need it, as opposed to by all tooling in perpetuity.