Hi Gary,

On Fri, 1 Sept 2023 at 14:19, Gary D. Gregory <ggreg...@apache.org> wrote:
>
> How is this possible now that we use spotless in 2.x:

It's a CRLF vs LF problem. About 6 months ago[1] I added a
`.gitattributes` file[2] that forces line endings as LF also on
Windows. This should solve two problems:
 * approach the goal of reproducibility on **any** OS with an OpenJDK
compiler; some Maven plugins may still use system-dependent line
endings, but most of the files should be Ok,
 * allow Spotless to work without Git (line endings are configured as
UNIX instead of the default "ask Git").

Git should take care of line endings after the file "is touched by
Git" (whatever that means). Usually a:

git add --renormalize *

helps. Another possibility is that Eclipse reconverts the line endings to CRLF.

Piotr

[1] https://lists.apache.org/thread/bvt8s71gf2k2g5lhy5sbf20xtcpvvbbo
[2] https://github.com/apache/logging-log4j2/blob/2.x/.gitattributes

Reply via email to