From: Junio C Hamano <gitster@pobox.com>
To: "Matt Hunter" <m@lfurio.us>
Cc: "h8d13 via GitGitGadget" <gitgitgadget@gmail.com>,
<git@vger.kernel.org>, "h8d13" <hadean-eon-dev@proton.me>
Subject: Re: [PATCH] clone: accept DEPTH env var as fallback for --depth
Date: Sat, 13 Jun 2026 08:20:05 -0700 [thread overview]
Message-ID: <xmqqeciafowq.fsf@gitster.g> (raw)
In-Reply-To: <DJ7MJMIFZR5N.2SG1RWB46WPQB@lfurio.us> (Matt Hunter's message of "Sat, 13 Jun 2026 00:08:02 -0400")
"Matt Hunter" <m@lfurio.us> 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.
next prev parent reply other threads:[~2026-06-13 15:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-13 1:39 [PATCH] clone: accept DEPTH env var as fallback for --depth h8d13 via GitGitGadget
2026-06-13 4:08 ` Matt Hunter
2026-06-13 15:20 ` Junio C Hamano [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-06-13 17:43 Hadrien Loge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqeciafowq.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=hadean-eon-dev@proton.me \
--cc=m@lfurio.us \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox