This is a dogs breakfast!
None of the solutions presented here actually work. Even the approach suggested by Paul, which should work, doesn’t because of a permissions issue; the mv
that is necessary fails because of a permissions failure.
+ pushd ../../..
~/gopath/src ~/gopath/src/gonum.org/v1/gonum
+ mv gonum.org/v1/gonum .
mv: cannot move 'gonum.org/v1/gonum' to './gonum': Permission denied
+ git config --global core.autocrlf false
+ git clone --depth=1 gonum gonum.org/v1/gonum
fatal: repository 'gonum' does not exist
Essentially the same outcome is obtained with a direct transliteration of the approach in above. I suspect that this is due to the fact that the code being run is a script in gonum.org/v1/gonum/.travis/
. This is necessary for the approach we are using to control multi-os testing.
What should happen here is that the default mutation of text under the user’s feet should not be happening unless it’s being asked for. The initial clone should not rewrite code; if it’s being developed on windows it will already have CRLF EOLs, if it’s cross-platform, the devs will already have a mechanism to handle differences in EOLs. This should just not be happening.
I have to say though, it does remind me why I don’t want to work on windows and harks back to the era of Clippy.
Edit: I have relented and now just unconditionally perform the reclone as described above. This works, but should not be needed.