command | clone depth | submodule depth | total sec |
---|---|---|---|
--depth + submodule --depth | 1 | 1 | 125sec |
--depth --single-branch + submodule depth | 1 | 1 | 127sec |
--depth --single-branch --recursive | 1 | 1 | 109sec |
--depth + submodule --depth | 100 | 1 | 126sec |
--depth --single-branch + submodule depth | 100 | 1 | 114sec |
--depth --single-branch --recursive | 100 | 100 | 107sec |
--depth + submodule --depth | 100 | 100 | 102sec |
--depth --single-branch + submodule depth | 100 | 100 | 108sec |
depth 1
# shallow: 103sec + 22sec
git clone --depth 1 https://github.com/Org/Repo
cd Repo
git submodule update --init --recursive --recommend-shallow --depth 1
# shallow_singlebranch: 105sec + 22sec
git clone --depth 1 --single-branch https://github.com/Org/Repo
cd Repo
git submodule update --init --recursive --recommend-shallow --depth 1
# shallow_single_submodule: 109sec
git clone --depth 1 --single-branch --recursive https://github.com/Org/Repo
depth 100 + 1
# shallow: 104sec + 22sec
git clone --depth 100 https://github.com/Org/Repo
cd Repo
git submodule update --init --recursive --recommend-shallow --depth 1
# shallow_singlebranch: 92sec + 22sec
git clone --depth 100 --single-branch https://github.com/Org/Repo
cd Repo
git submodule update --init --recursive --recommend-shallow --depth 1
# shallow_single_submodule: 107sec
git clone --depth 100 --single-branch --recursive https://github.com/Org/Repo
depth 100 + 100
# shallow: 90sec + 12sec
git clone --depth 100 https://github.com/Org/Repo
cd Repo
git submodule update --init --recursive --recommend-shallow --depth 100
# shallow_singlebranch: 96sec + 12sec
git clone --depth 100 --single-branch https://github.com/Org/Repo
cd Repo
git submodule update --init --recursive --recommend-shallow --depth 100