Closed iyear closed 2 years ago
Are you able to buid in WSL ? few days back I was also on WSL but the make build was showing some errors
@shubham-cmyk I haven't use make build
, I just found this after using make fmt
@iyear are you execute the make fmt
in Windows Subsystem for Linux
? I only have an arm64 mac and can't reproduce this problem. But it sounds a good idea to add a .gitattributes
@IronCore864 What's your opinion?
@daniel-hutao Yes, I run make fmt
in WSL
Related issue: https://github.com/golang/go/issues/16355
Maybe this helps?
https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration
@algobot76 Yes, it solves the problem, but it requires every windows contributor to set this config on every machine. So the .gitattributes
addition is still necessary.
@algobot76 Yes, it solves the problem, but it requires every windows contributor to set this config on every machine. So the
.gitattributes
addition is still necessary.
@algobot76 Thank you for the reply!
@iyear I agree with you. Although we should set the core.autocrlf
locally, but maybe some users won't know what happened and what can do to fix it. So the .gitattributes
will be a friendly configuration.
Would you please adding this config file and do some tests with it?
@daniel-hutao I know roughly how .gitattributes
should be written, but what does it mean to test? Like if I run make fmt
once to see if it makes all files changed?
Or need a specific test file? I don't seem to know what this is.
@daniel-hutao I know roughly how
.gitattributes
should be written, but what does it mean to test? Like if I runmake fmt
once to see if it makes all files changed?Or need a specific test file? I don't seem to know what this is.
I guess you could use a simple bash script to test if the line ending is what you expected after running make fmt
. See https://stackoverflow.com/a/3570161
@daniel-hutao I know roughly how
.gitattributes
should be written, but what does it mean to test? Like if I runmake fmt
once to see if it makes all files changed? Or need a specific test file? I don't seem to know what this is.I guess you could use a simple bash script to test if the line ending is what you expected after running
make fmt
. See https://stackoverflow.com/a/3570161
I may know what to do now, thanks for the reply!
What would you like to add? Why is this needed?
533
I'm using windows and after running
make fmt
inwsl
all the CRLFs are replaced with LFs, resulting in all the files becoming changed.Do we need a
.gitattributes
to unify the different platforms?