This is required to ensure that multiple clones of the same repo will use the same cache folder, even when the cache folders are deleted between the clones getting created:
- Clone repo
- Delete shared cache
- Clone a second copy of the repo
Both copies should use the same shared cache location.
Rather than using a mapping file, the following approach can be used:
- Append
vsts/info to the clone URL and check if there is a response.
- If there is a response: Use the repo ID in the response
- If there is not a response: Use a stable hash to compute a folder name from the URL
Additionally, drop a text file inside the repo specific cache directory that includes the name/URL of the repo. That file should get picked up by the diagnose verb.
This is required to ensure that multiple clones of the same repo will use the same cache folder, even when the cache folders are deleted between the clones getting created:
Both copies should use the same shared cache location.
Rather than using a mapping file, the following approach can be used:
vsts/infoto the clone URL and check if there is a response.Additionally, drop a text file inside the repo specific cache directory that includes the name/URL of the repo. That file should get picked up by the
diagnoseverb.