From: "Srujith A Poojary via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Srujith A Poojary <poojarysrujith@gmail.com>,
Srujith A Poojary <poojarysrujith@gmail.com>
Subject: [PATCH v5] archive-tar: add comments explaining configuration precedence
Date: Wed, 11 Nov 2026 12:45:42 +0000 [thread overview]
Message-ID: <pull.2305.v5.git.1794401142594.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.2305.git.1794251100.gitgitgadget@gmail.com>
From: Srujith A Poojary <poojarysrujith@gmail.com>
Document the initialization order in init_tar_archiver() to clarify
that built-in default filters are registered before repo_config() is
called, ensuring user configuration correctly overrides defaults.
Signed-off-by: Srujith A Poojary <poojarysrujith@gmail.com>
---
[Outreachy PATCH] archive: remove USE_THE_REPOSITORY_VARIABLE from
archival modules
Refactored archive-tar.c, archive-zip.c, archive.c, and supporting files
to use explicit struct repository *repo pointers instead of global
repository variables.
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2305%2Fpoojarysrujith%2Farchive-libification-refactor-v5
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2305/poojarysrujith/archive-libification-refactor-v5
Pull-Request: https://github.com/gitgitgadget/git/pull/2305
Range-diff vs v4:
1: 29130b6eb2 ! 1: 47172b861b archive: remove USE_THE_REPOSITORY_VARIABLE from archival modules
@@ Metadata
Author: Srujith A Poojary <poojarysrujith@gmail.com>
## Commit message ##
- archive: remove USE_THE_REPOSITORY_VARIABLE from archival modules
+ archive-tar: add comments explaining configuration precedence
- Refactor archive-tar.c and builtin/archive.c to clean up archiver
- initialization order and header dependencies.
+ Document the initialization order in init_tar_archiver() to clarify
+ that built-in default filters are registered before repo_config() is
+ called, ensuring user configuration correctly overrides defaults.
Signed-off-by: Srujith A Poojary <poojarysrujith@gmail.com>
archive-tar.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/archive-tar.c b/archive-tar.c
index a1c66024d4..1b376d048a 100644
--- a/archive-tar.c
+++ b/archive-tar.c
@@ -531,11 +531,15 @@ void init_tar_archiver(void)
int i;
register_archiver(&tar_archiver);
+ /* Set built-in defaults first so user config can override them */
tar_filter_config("tar.tgz.command", internal_gzip_command, NULL);
tar_filter_config("tar.tgz.remote", "true", NULL);
tar_filter_config("tar.tar.gz.command", internal_gzip_command, NULL);
tar_filter_config("tar.tar.gz.remote", "true", NULL);
+
+ /* Load repository config so user settings override the defaults above */
repo_config(the_repository, git_tar_config, NULL);
+
for (i = 0; i < nr_tar_filters; i++) {
/* omit any filters that never had a command configured */
if (tar_filters[i]->filter_command)
base-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd
--
gitgitgadget
prev parent reply other threads:[~2026-11-11 12:45 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 19:04 [PATCH 0/2] [Outreachy PATCH] archive: remove USE_THE_REPOSITORY_VARIABLE from archival modules Srujith A Poojary via GitGitGadget
2026-11-09 19:04 ` [PATCH 1/2] submodule: use the submodule repository to abbreviate commits Srujith A Poojary via GitGitGadget
2026-11-09 19:05 ` [PATCH 2/2] archive: remove USE_THE_REPOSITORY_VARIABLE from archival modules Srujith A Poojary via GitGitGadget
2026-11-09 20:45 ` Junio C Hamano
2026-11-10 8:13 ` Srujith Poojary
2026-11-10 6:03 ` [PATCH v2 0/2] [Outreachy PATCH] " Srujith A Poojary via GitGitGadget
2026-11-10 6:03 ` [PATCH v2 1/2] submodule: use the submodule repository to abbreviate commits Srujith A Poojary via GitGitGadget
2026-11-10 6:03 ` [PATCH v2 2/2] archive: remove USE_THE_REPOSITORY_VARIABLE from archival modules Srujith A Poojary via GitGitGadget
2026-11-10 16:07 ` Junio C Hamano
2026-11-10 18:33 ` Srujith Poojary
2026-11-10 18:39 ` [PATCH v3 0/2] [Outreachy PATCH] " Srujith A Poojary via GitGitGadget
2026-11-10 18:39 ` [PATCH v3 1/2] submodule: use the submodule repository to abbreviate commits Srujith A Poojary via GitGitGadget
2026-11-10 20:26 ` Junio C Hamano
2026-11-11 4:19 ` Srujith Poojary
2026-11-10 18:39 ` [PATCH v3 2/2] archive: remove USE_THE_REPOSITORY_VARIABLE from archival modules Srujith A Poojary via GitGitGadget
2026-11-10 20:40 ` Junio C Hamano
2026-11-11 4:17 ` Srujith Poojary
2026-11-11 8:34 ` Srujith Poojary
2026-11-10 19:17 ` [PATCH v3 0/2] [Outreachy PATCH] " Junio C Hamano
2026-11-11 8:25 ` [PATCH v4] " Srujith A Poojary via GitGitGadget
2026-11-11 11:08 ` Karthik Nayak
2026-11-11 12:24 ` Srujith Poojary
2026-11-11 12:45 ` Srujith A Poojary via GitGitGadget [this message]
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=pull.2305.v5.git.1794401142594.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=poojarysrujith@gmail.com \
/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