Speed up Autosubmit create and refresh by only cloning preferred branch
Due to the I/O speed problems in /esarchive that is creating a bottleneck on experiment's creation and refresh, I think it would help to have an option in Autosubmit to only clone the branch the user wants (in case is going to run experiments and not use different branches for develop).
I did some tests with Auto-EC-Earth3 and the difference is huge (of course, due to this issue with the bug files):
git clone -b trunk --single-branch https://earth.bsc.es/gitlab/es/auto-ecearth3.git
Cloning into 'auto-ecearth3'...
remote: Enumerating objects: 11654, done.
remote: Counting objects: 100% (11654/11654), done.
remote: Compressing objects: 100% (4537/4537), done.
remote: Total 11654 (delta 7497), reused 10641 (delta 6834)
Receiving objects: 100% (11654/11654), 132.22 MiB | 3.00 MiB/s, done.
git clone https://earth.bsc.es/gitlab/es/auto-ecearth3.git
Cloning into 'auto-ecearth3'...
remote: Enumerating objects: 18747, done.
remote: Counting objects: 100% (18747/18747), done.
remote: Compressing objects: 100% (6294/6294), done.
remote: Total 18747 (delta 12104), reused 18589 (delta 12002)
Receiving objects: 100% (18747/18747), 293.61 MiB | 6.43 MiB/s, done.
It turns out that I am cloning 132MiB (it should be much less though) instead of 293MiB.
I have not found any way to apply it also to submodules. Using --recursive with the clone doesn't seem to make any difference, but we can investigate.