From: Junio C Hamano <gitster@pobox.com>
To: "Srujith A Poojary via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Srujith A Poojary <poojarysrujith@gmail.com>
Subject: Re: [PATCH v3 2/2] archive: remove USE_THE_REPOSITORY_VARIABLE from archival modules
Date: Tue, 10 Nov 2026 12:40:00 -0800 [thread overview]
Message-ID: <xmqqse18pgin.fsf@gitster.g> (raw)
In-Reply-To: <398b54f00a1278f22fef456384c6c4ebd1a1f576.1794335969.git.gitgitgadget@gmail.com> (Srujith A. Poojary via GitGitGadget's message of "Tue, 10 Nov 2026 18:39:29 +0000")
"Srujith A Poojary via GitGitGadget" <gitgitgadget@gmail.com>
writes:
> From: Srujith A Poojary <poojarysrujith@gmail.com>
>
> Refactor archive-tar.c, archive-zip.c, archive.c, and supporting files
> to clean up archiver initialization functions and header dependencies.
>
> Signed-off-by: Srujith A Poojary <poojarysrujith@gmail.com>
> ---
> archive-tar.c | 5 ++---
> builtin/archive.c | 1 +
> 2 files changed, 3 insertions(+), 3 deletions(-)
Where is the change to archive-zip.c the proposed log message
advertises?
The proposed log message claims that it refactors and cleans up, but
the patch looks like a totally incoherent and unexplained mess. All
the places I note "What is this change about?" are unexplained
changes whose value is dubious.
> diff --git a/archive-tar.c b/archive-tar.c
> index a1c66024d4..642a3ddfc3 100644
> --- a/archive-tar.c
> +++ b/archive-tar.c
> @@ -3,7 +3,6 @@
> */
>
> #define USE_THE_REPOSITORY_VARIABLE
> -
> #include "git-compat-util.h"
> #include "config.h"
> #include "gettext.h"
What is this change about?
> @@ -337,7 +336,7 @@ static void write_global_extended_header(struct archiver_args *args)
> if (oid)
> strbuf_append_ext_header(&ext_header, "comment",
> oid_to_hex(oid),
> - the_hash_algo->hexsz);
> + args->repo->hash_algo->hexsz);
> if (args->time > USTAR_MAX_MTIME) {
> strbuf_append_ext_header_uint(&ext_header, "mtime",
> args->time);
Here, the args->repo which was relayed by archive.c:write_archive()
is used. This function, when called by builtin/archive.c, passes
the repo it obtained from git.c's dispatcher; when it is called by
builtin/upload-archive.c, it uses the_repository (which is fine).
This hunk looks like a good change.
> @@ -529,13 +528,13 @@ static struct archiver tar_archiver = {
> void init_tar_archiver(void)
> {
> int i;
> + repo_config(the_repository, git_tar_config, NULL);
> register_archiver(&tar_archiver);
>
> 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);
> - 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)
What is this change about? Earlier, we first declared the built-in
default configurations and then read from the configuration files.
Now you read the configuration files, and then overwrite the values
the configuration files specified with our built-in default?
> diff --git a/builtin/archive.c b/builtin/archive.c
> index 3c1288a123..8b7d56f8cb 100644
> --- a/builtin/archive.c
> +++ b/builtin/archive.c
> @@ -2,6 +2,7 @@
> * Copyright (c) 2006 Franck Bui-Huu
> * Copyright (c) 2006 Rene Scharfe
> */
> +#define USE_THE_REPOSITORY_VARIABLE
> #include "builtin.h"
> #include "archive.h"
> #include "gettext.h"
What is this change about?
next prev parent reply other threads:[~2026-11-10 20:40 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 [this message]
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 ` [PATCH v5] archive-tar: add comments explaining configuration precedence Srujith A Poojary via GitGitGadget
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=xmqqse18pgin.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.