Closed lorencr7 closed 1 year ago
Hi, is there a plan to implement this enhancement? We would really love to start using this orb in our project
Yes, I would like to implement this feature for next. Please wait a momennt.
Confirm current implementation failed with source caching.
@lorencr7 I've published v2.7.0 with Source caching support. Can you try it? Please reopen issue when you have issue with.
https://circleci.com/developer/orbs/orb/guitarrapc/git-shallow-clone?version=2.7.0
Yes. If I can't this week, I'll definitely next week. Got some events to attend earlier. I'll let you know, thank you very much
Hello. I just tested it and it is working fine. Thank you very much again
Is there an existing issue that is already proposing this?
Describe the problem imposed by not having this feature
When using shallow checkout in addition with the source caching in CCI https://circleci.com/docs/caching/#source-caching the clone fails because the folder isn't empty. This is because the .git folder is restored from a previous build.
The benefits of this is that the shallow checkout generates cache much smaller than the regular checkout (in our case 347MB vs 940MB) and it speeds up a lot the checkout process and cache recovering, consuming less credits as well
Describe the solution you'd like
If you analyze the source code of the default CCI checkout step you can see that they have a condition for this, and instead of cloning the repo, they do a "remote set-url"
if [ -e '/Users/distiller/project/.git' ] ; then echo 'Fetching into existing repository' existing_repo='true' cd '/Users/distiller/project' git remote set-url origin "$CIRCLE_REPOSITORY_URL" || true else echo 'Cloning git repository' existing_repo='false' mkdir -p '/Users/distiller/project' cd '/Users/distiller/project' git clone --no-checkout "$CIRCLE_REPOSITORY_URL" . fi
Could you please add support to your orb to the source-caching provided by CCI?
Thank you
Other
No response