Skip to content

Conversation

@ahus1
Copy link
Contributor

@ahus1 ahus1 commented Dec 22, 2025

Closes #5849

Motivation:

This aligns the Git settings with the behavior of CodeGen.

An alternative approach would be to teach CodeGen to use the platform specific line endings. Let me know if that is preferred instead, or any other solution.

This aligns the Git settings with that behavior.

Closes eclipse-vertx#5849
@ahus1 ahus1 force-pushed the is-5849-lf-on-windows branch from b076cb7 to 7fb4717 Compare December 25, 2025 09:23
@ahus1 ahus1 marked this pull request as ready for review December 25, 2025 09:43
@vietj
Copy link
Member

vietj commented Dec 26, 2025

as I understand, that will have an effect on repository commits since in our projects we do checkin the generated code ?

@ahus1
Copy link
Contributor Author

ahus1 commented Dec 27, 2025

Actually it will have an effect on all git checkouts. AFAIK Git already has a handling to normalize CRLR / LR on all text files before committing them. And when checking them out, it will apply the platform specific line handling to all text files.

This now ensures that whenever a generated file is checkout out from Git, it will always have LF line endings the way the Vert.x code generator uses. This way an IDE will no longer show the files as changed.

Alternatives: (1) do not check in generated code, or (2) teach the generator to generate files with the line endings of the OS it runs on.

See for a longer and official explanation: https://git-scm.com/docs/gitattributes#_eol

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

Labels

None yet

2 participants