Git checkout and submodules?
I'm running into a problem (hopefully nearly the last with the Mono build).
This appears to be related to use of git submodules. When I build on other platforms, including a Windows Server 2012 on Azure, the build process works correctly and includes registration of git submodules in external\
When I try this under Mono I don't get anything about the submodules, and doing a listing the external\ folder doesn't seem to exist
I'm wondering exactly how the git clone is being done as it seems there might be some kind of difference there?
Comments are currently closed for this discussion. You can start a new one.
|?||Show this help|
|ESC||Blurs the current field|
|r||Focus the comment reply box|
|^ + ↩||Submit the comment|
You can use
Command ⌘ instead of
Control ^ on Mac
1 Posted by ajlennon on 22 Oct, 2014 02:31 PM
"When I try this under Mono"
* correction, under Appveyor
2 Posted by ajlennon on 22 Oct, 2014 03:57 PM
It looks very much as though the build folder, which I thought was cloned and thus a git repo is actually something more akin to an export. It doesn't seem to have .git ?
Support Staff 3 Posted by Feodor Fitsner on 22 Oct, 2014 04:02 PM
Do you have shallow_clone enabled?
4 Posted by ajlennon on 22 Oct, 2014 04:04 PM
I did have. I thought that might be the problem and disabled it but I still seem to get the same behaviour
5 Posted by ajlennon on 22 Oct, 2014 04:55 PM
I'm now seeing a different behaviour:
I see the git clone and checkout occur in the log
git config --global core.autocrlf false
11git clone -q --branch=master git://github.com/DynamicDevices/mono.git C:\projects\mono-817
12git checkout -qf abbb03e5acb7b631dbe0aee85c7a1777b90a9d4b
Unfortunately even though I configure the Windows git client not to convert line endings the repo overrides this and the git checkout is checking out with CRLF endings which then causes issues under cygwin
Is there a way for me to override the git checkout command to cause it to clone/checkout with the Cygwin git execuable?
Support Staff 6 Posted by Feodor Fitsner on 22 Oct, 2014 05:33 PM
Right now there is no way to override git sequence unless you do some sort of "bootstrap" project with lightweight repo and some build script that clones your main repo during the build.
I'm just wondering why changing
core.autocrlfdidn't work for you. Have you tried reading it back immediately after changing? By default git is installed with
7 Posted by ajlennon on 22 Oct, 2014 05:43 PM
I'm not a git expert but I've been reading up a little and the way I understand it works is that you can set your preferred configuration with core.autocrlf but if there is a setting in .gitattributes then this will override what you have set locally
There are conversion settings in .gitattributes which I believe are setting the files to be checked out appropriately for the platform. The problem then comes when we do the Win32 checkout but then go into Cygwin for the build...
I'm taking a look now at some options to remove that .gitattributes file from the fetched repo and rechecking out with the line endings correct for Unix..
Thanks :) Alex
8 Posted by ajlennon on 23 Oct, 2014 04:30 PM
For some reason if I change core.autocrlf false (which I was setting to ensure the endings weren't being changed) to core.autocrlf input then all is well.
I can't quite understand why that should be, but am v. pleased that I now have a Git repo downloading and building :)) Thanks
ajlennon closed this discussion on 23 Oct, 2014 04:30 PM.