Gitattr eol design
The example implementation can be found at https://github.com/06393993/jj/compare/gitattr-eol-example-impl%5E...gitattr-eol-example-impl.
Checklist
If applicable:
- [ ] I have updated
CHANGELOG.md - [ ] I have updated the documentation (
README.md,docs/,demos/) - [ ] I have updated the config schema (
cli/src/config-schema.json) - [ ] I have added/updated tests to cover my changes
@yuja before I start to work on this feature, do we agree that we really want more EOL conversion related features in jj, especially the text gitattributes and the eol gitattributes support? Given that you thought EOL conversion is a mistake in VCS, and should be implemented at an entire different layer out side the VCS software. If we don't think we should not add such feature, I am Ok to drop the work and leave details in the document on why we don't such features in jj. Thanks.
do we agree that we really want more EOL conversion related features in
jj, especially thetextgitattributesand theeolgitattributessupport?
I don't understand how gitattributes works exactly, but we'll have to support some of them for Git interop. I'm not against adding something that enables EOL conversion conditionally based on paths (e.g. *.jpg -text.)
Hi all, I think this design is ready for review. Please comment on the questions left in the Open questions section if you have opinions to those questions. I will adjust the design accordingly. Thanks!
Do we need more detailed description in the Prior work section?
I don't believe so, since it's just implementation and not architecture the links should be enough context.
TODO after this change is merged:
- [ ] File an issue for gitattributes diff support.
- [ ] File an issue for gitattributes merge support.
- [ ] File an issue for
git add --renormalizesupport. - [ ] File an issue for per-backend default on
working-copy.eol-conversion-use-gitattributes. - [ ] File an issue on external diff tool and merge tool support.
- [ ] File an issue on how conversion should be applied: before the conflicts are materialized and apply the conversion on multiple sides, or apply once on the materialized conflict with the conflict marker.