From: Junio C Hamano Date: Sat, 13 Jun 2026 15:20:05 GMT Subject: Re: [PATCH] clone: accept DEPTH env var as fallback for --depth Message-ID: In-Reply-To: "Matt Hunter" writes: > On Fri Jun 12, 2026 at 9:39 PM EDT, h8d13 via GitGitGadget wrote: >> @@ -1022,6 +1022,12 @@ int cmd_clone(int argc, >> usage_msg_opt(_("You must specify a repository to clone."), >> builtin_clone_usage, builtin_clone_options); >> >> + if (!option_depth) { >> + const char *env_depth = getenv("DEPTH"); > > Nearly all of the non-standard environment variables used by git start > with "GIT_". "GIT_CLONE_DEPTH" may be a better choice. Isn't it sufficient to add a new configuration variable in the clone.* namespace? Unless there is a reason why it does not work, I won't accept a patch that adds a random environment support like this. We do not want to end up having to add other random environment variables like GIT_CLONE_DEFAULTREMOTENAME, CLONE_REJECTSHALLOW, CLONE_FILTERSUBMODULES for consistency.