Re: [PATCH] clone: accept DEPTH env var as fallback for --depth
- From
- Hadrien Loge <hadrien.loge@gmail.com>
- Date
- Jun 13, 2026, 17:43 UTC
- Message-ID
- <CADeHOfw6kNstNFucG7an6+Mbm2+=-PnOH8xtZkO9RK8=eWsx=w@mail.gmail.com>
Well mainly I'm asking this for packaging (Arch/Alpine/Etc) These all follow similar conventions (PKGBUILD/APKBUILD).
But in nested flows the ENV var seems like the proper solution.
Mainly I gave this example on github:
git clone --depth 1 url dest
cd dest
bash run.sh
here run.sh has its own clone deps (perhaps even multiple)
--depth 1 is now lostAnd only ENV vars that I can think of properly propagate for CI flows/clean chroot envirs. Thank you for considering the solution. It would be very useful for speeding up packaging. Even on 5k commits history it's 900kb vs 17mb.
I have also reworked the commit to include tests/docs. and rename to GIT_CLONE_DEPTH
Kind regards, Hade