git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] clone: accept DEPTH env var as fallback for --depth

From
HLHadrien 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 lost

And 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

Next: brian m. carlson
Message 1 of 2 in “Re: [PATCH] clone: accept DEPTH env var as fallback for --depth”
  1. Hadrien LogeJun 13, 2026
  2. brian m. carlsonJun 14, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.