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 14, 2026, 08:13 UTC
Message-ID
<CADeHOfx3O9KpORQdLmvb0BPhaHUGmtxoyDEqySNQY_d6+ia7VA@mail.gmail.com>
> So say someone has this set in their environment and then they run a

script that clones a repository and runs `git describe`. That no longer works and the script fails because it assumed that it had history.

That is insightful but that I fail to see how that makes `git` less capable. As Junio pointed there already other ENV vars that do _less_ useful stuff

As to breakage, this is mostly for packaging in clean chroots. If a "history" feature is asked, obviously you skip setting this.

And yes the packages need network to build because they are mostly user generated. For example applying patches to other repos, before building tar archives.

I also fail to see how that would affect existing flows at all?
> because shallow fetches are _extremely_ expensive to serve

That seems like an unrelated issue to my patch yet is also interesting as to why that would be the case. I might actually want to dig into. Because to me, I was saving electrons, at least on my end. And saving time to other packagers.

Thanks for the thoughtful reply. I hope this patch can still be considered Hade

Message 1 of 1 in “Re: [PATCH] clone: accept DEPTH env var as fallback for --depth”
  1. Hadrien LogeJun 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.