]> git.ipfire.org Git - thirdparty/git.git/commitdiff
builtin/receive-pack: drop redundant tmpdir env
authorJustin Tobler <jltobler@gmail.com>
Fri, 10 Jul 2026 16:37:21 +0000 (11:37 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Jul 2026 20:21:53 +0000 (13:21 -0700)
When performing the connectivity checks for a shallow ref in
`update_shallow_ref()`, the child process environment variables are
populated via `tmp_objdir_env()`. This is unnecessary though as
`update_shallow_ref()` is only reached after `tmp_objdir_migrate()` has
been performed which means there is no longer a temporary directory that
needs to be shared with child processes.

Drop the call to `tmp_objdir_env()` accordingly.

Signed-off-by: Justin Tobler <jltobler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/receive-pack.c

index 19eb6a1b61c3a73f9d87d54ff075b1fb12a0b5e3..50bc05c70c24e843380d03b615c16de671e66be1 100644 (file)
@@ -1363,7 +1363,6 @@ static int update_shallow_ref(struct command *cmd, struct shallow_info *si)
                    !delayed_reachability_test(si, i))
                        oid_array_append(&extra, &si->shallow->oid[i]);
 
-       opt.env = tmp_objdir_env(tmp_objdir);
        setup_alternate_shallow(&shallow_lock, &opt.shallow_file, &extra);
        if (check_connected(command_singleton_iterator, cmd, &opt)) {
                rollback_shallow_file(the_repository, &shallow_lock);