[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Shallow git update in bootstrap
From: |
Carles Pina i Estany |
Subject: |
Shallow git update in bootstrap |
Date: |
Sun, 6 Aug 2023 00:25:01 +0200 |
Hi,
This is a wishlist / question regarding using "--depth 2" in "git
submodule init --" in the bootstrap file.
I was building a project that uses gnulib (with bootstrap).
./bootstrap does:
"""
if git_modules_config submodule.gnulib.url >/dev/null; then
echo "$0: getting gnulib files..."
git submodule init -- "$gnulib_path" || exit $?
git submodule update -- "$gnulib_path" || exit $?
"""
The "git submodule update" takes a long time. Would it be possible to
use "--depth 1" there? (and in other "git submodule update"s?
A few lines below it checks if "git clone -h 2>&1" has the option
--depth and use it if possible. Perhaps the same approch could be done
in the "git submodule update"s ? (in my case the default code path uses
"git submodule update" and not "git clone" with the --depth 2)
I wonder if there is any reason not to use the --depth 2 for the update.
When I say "long time" (and data transmission) in my case it's 9
minutes:
-----
carles@pinux:[master]~/git/wget2$ time git submodule update --init
Cloning into '/home/carles/git/wget2/gnulib'...
Submodule path 'gnulib': checked out '2ae6faf9c78384dc6a2674b62dd56ff153cd51f6'
real 9m1,135s
user 6m24,309s
sys 0m5,020s
-----
Actually, the first time I wondered if the connection or something else
failed.
Thank you very much,
--
Carles Pina i Estany
https://carles.pina.cat || Wiktionary translations: https://kamus.pina.cat
- Shallow git update in bootstrap,
Carles Pina i Estany <=