cmarcusreid / git-status-cache

High performance cache for git repository status. Clients can retrieve information via named pipe.
MIT License
16 stars 4 forks source link

When a repo is set to autocrlf, all files appear to be modified #24

Open yatli opened 6 years ago

yatli commented 6 years ago

I'm wondering if this problem is a single case, or it's because libgit2 is not synchronizing with the repo setting/global setting.

dahlbyk commented 6 years ago

Does your repo have a .gitattributes?

yatli commented 6 years ago

Hi @dahlbyk !

I've tried with different repos, some with .gitattributes and some not. But the attr files don't explicitly write autocrlf there -- it's the default global git configuration done with choco install -y git.

dahlbyk commented 6 years ago

To clarify, does explicitly setting core.autocrlf in an affected repo (either with or without .gitattributes) fix this?

Without calling git_config_open_default or equivalent, I'm not sure if libgit2 will pick up global/system config.

yatli commented 6 years ago

I added autocrlf = true in [core] in .git/config and it picks up the config.