This is caused by a bug in Windows batch file parser. More information can be found in the issue (including a simple reproduction):
https://github.com/golang/go/issues/37791
all batch files (eg: src/make.bat) have LF endings in the archive.
Notice that this does not match the behavior of git-archive or even GitHub (https://github.com/golang/go/archive/master.zip). Both correctly create archives that respect .gitattributes and have correct CRLF endings for batch files.
I've recently pushed a commit to Go repository to force Windows
.bat
files to have CRLF endings: https://github.com/golang/go/commit/787e7b048cff392d1cb68c57c99ff71602997475This is caused by a bug in Windows batch file parser. More information can be found in the issue (including a simple reproduction): https://github.com/golang/go/issues/37791
Unfortunately, it seems that gitlies ignores this when downloading an archive. If you get a
tgz
archive from Go master branch: https://go.googlesource.com/go/+archive/refs/heads/master.tar.gzall batch files (eg:
src/make.bat
) have LF endings in the archive.Notice that this does not match the behavior of
git-archive
or even GitHub (https://github.com/golang/go/archive/master.zip). Both correctly create archives that respect.gitattributes
and have correct CRLF endings for batch files.