microsoft / scalar

Scalar: A set of tools and extensions for Git to allow very large monorepos to run on Git without a virtualization layer
MIT License
1.39k stars 63 forks source link

Scalar forces autocrlf=false and safecrlf=false for cloned repo #391

Closed nikola-sh closed 4 years ago

nikola-sh commented 4 years ago

Scalar configures cloned repo with settings

[core]
    autocrlf=false
    safecrlf=false

It is explainable for VFSForGit, but it seems unnecessary for Scalar.

I would suggest to respect user and system git settings for CRLF transformation.

derrickstolee commented 4 years ago

The auto-CRLF conversions do have a noticeable performance impact in large repos, so I believe that we will want to keep them enabled by default. Most users will have it enabled globally, so we need to override it locally.

However, the way we set them make it a required setting instead of optional. The best thing to do would be to move the setting from requiredSettings to optionalSettings, which will respect the choice if a user decided to change the setting in the local Git config, after the clone.