"clone with a reference" warning - more explanation required

I’ve started getting this warning:
Clone with a reference was detected. Some files will miss SCM information. This will affect features like auto-assignment of issues. Please configure your build to not clone using a local reference.

What is ‘cloning with a local reference’?
I use TeamCity and GIT. As far as I can tell, the TeamCity GIT checkout stage downloads the source directly from our remote GIT server onto a folder within the TeamCity agent. I don’t see any form of local reference. What should I check/alter to prevent this warning?

1 Like

Hi,
the checkout stage is probably cloning from a local cache stored in the disk.
See the section about --reference here.
You can check the file .git/objects/info/alternates to confirm that this is happening. The solution would be to change the checkout to a full clone.

Hi,

Thanks for the reply. Since upgrading to Sonar v7.9.2 the warnings I was previously seeing have gone away. I didn’t think we were cloning from a cache!