boss icon indicating copy to clipboard operation
boss copied to clipboard

CR vs CRLF

Open birbilis opened this issue 5 months ago • 1 comments

At READCOM.Core.Delphi package on GitHub, at TStoryItem class, I have an ancestor TCustomManipulator from the Zoomicon.Manipulation.Delphi package

So I do BOSS update and bring in the dependencies etc. but when opening the ancestor file (from the modules subfolder where BOSS brings it), I see IDE complains about CR instead of CRLF

Zoomicon.Manipulation.FMX.CustomManipulator.pas(1): Line endings are LF, but RAD Studio requires CRLF. Consider converting or check your source control settings.

Is there a case BOSS brings in remote files with CR instead of CRLF? I think other Git clients (using TortoiseGit) convert to CRLF when on Windows or maybe ask Git to do it.

I think I have set GitHub to prefer to give CRLF to Windows clients (or maybe this is set at Git repository itself), don't remember. There could be a case where BOSS converts itself to CR or forces the Git server to bring CR, or maybe doesn't set some user-agent or similar to tell it's acting as a Git client from Windows or other CRLF preferring system.

birbilis avatar Jul 16 '25 14:07 birbilis

Hello @birbilis, please send me your boss.json.

ownerigor avatar Sep 14 '25 01:09 ownerigor

@birbilis, the desired function was implemented in the refactor branch.

> Git Client

You can configure which Git client BOSS should use.

  • embedded: Uses the built-in go-git client (default).
  • native: Uses the system's installed git client (git.exe).

Using native is recommended on Windows if you need support for core.autocrlf (automatic line ending conversion).

boss config git mode native
# or
boss config git mode embedded

CarlosHe avatar Dec 14 '25 03:12 CarlosHe