]> git.ipfire.org Git - thirdparty/git.git/commitdiff
refs/packed: use repo_create_tempfile()
authorRené Scharfe <l.s.r@web.de>
Tue, 14 Jul 2026 17:59:53 +0000 (19:59 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 14 Jul 2026 19:54:25 +0000 (12:54 -0700)
Apply the config setting core.sharedRepository from the ref store base
repository at hand instead of from the_repository.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs/packed-backend.c

index 0acde48c4525132b17715cc735c64a3078c27e02..7c4e8aca87355596215f505e2c6b32721d728327 100644 (file)
@@ -1379,7 +1379,7 @@ static enum ref_transaction_error write_with_updates(struct packed_ref_store *re
        packed_refs_path = get_locked_file_path(&refs->lock);
        strbuf_addf(&sb, "%s.new", packed_refs_path);
        free(packed_refs_path);
-       refs->tempfile = create_tempfile(sb.buf);
+       refs->tempfile = repo_create_tempfile(refs->base.repo, sb.buf);
        if (!refs->tempfile) {
                strbuf_addf(err, "unable to create file %s: %s",
                            sb.buf, strerror(errno));