git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 2/2] archive: remove USE_THE_REPOSITORY_VARIABLE from archival modules

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 10, 2026, 16:07 UTC
Message-ID
<xmqq1p8svfdv.fsf@gitster.g>
In-Reply-To
<3d8d9a9261a1f4fcb883ab9afd236f254a494430.1794290598.git.gitgitgadget@gmail.com>

"Srujith A Poojary via GitGitGadget" <gitgitgadget@gmail.com> writes:

Show 12 quoted lines
> From: Srujith A Poojary <poojarysrujith@gmail.com>
>
> Refactor archival modules (archive-tar.c, archive-zip.c, archive.c,
> builtin/archive.c, builtin/upload-archive.c, and diagnose.c) to accept
> and pass explicit struct repository * pointers instead of relying on
> global repository state.
>
> Signed-off-by: Srujith A Poojary <poojarysrujith@gmail.com>
> ---
>  archive-tar.c     | 5 ++---
>  builtin/archive.c | 1 +
>  2 files changed, 3 insertions(+), 3 deletions(-)

Is the description above really for the change in this message? It does not seem to match at all to me.

Show 49 quoted lines
>
> 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"
> @@ -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);
> @@ -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)
> 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"
Previous: Srujith A Poojary via GitGitGadgetNext: Srujith Poojary
Message 9 of 23 in “archive: remove USE_THE_REPOSITORY_VARIABLE from archival modules”
  1. 0/2 [Outreachy PATCH] archive: remove USE_THE_REPOSITORY_VARIABLE from archival modulesSrujith A Poojary via GitGitGadget, Nov 9, 2026
  2. 1/2 submodule: use the submodule repository to abbreviate commitsSrujith A Poojary via GitGitGadget, Nov 9, 2026
  3. 2/2 archive: remove USE_THE_REPOSITORY_VARIABLE from archival modulesSrujith A Poojary via GitGitGadget, Nov 9, 2026
  4. Junio C HamanoNov 9, 2026
  5. Srujith PoojaryNov 10, 2026
  6. 0/2 [Outreachy PATCH] archive: remove USE_THE_REPOSITORY_VARIABLE from archival modulesSrujith A Poojary via GitGitGadget, Nov 10, 2026
  7. 1/2 submodule: use the submodule repository to abbreviate commitsSrujith A Poojary via GitGitGadget, Nov 10, 2026
  8. 2/2 archive: remove USE_THE_REPOSITORY_VARIABLE from archival modulesSrujith A Poojary via GitGitGadget, Nov 10, 2026
  9. Junio C HamanoNov 10, 2026
  10. Srujith PoojaryNov 10, 2026
  11. 0/2 [Outreachy PATCH] archive: remove USE_THE_REPOSITORY_VARIABLE from archival modulesSrujith A Poojary via GitGitGadget, Nov 10, 2026
  12. 1/2 submodule: use the submodule repository to abbreviate commitsSrujith A Poojary via GitGitGadget, Nov 10, 2026
  13. Junio C HamanoNov 10, 2026
  14. Srujith PoojaryNov 11, 2026
  15. 2/2 archive: remove USE_THE_REPOSITORY_VARIABLE from archival modulesSrujith A Poojary via GitGitGadget, Nov 10, 2026
  16. Junio C HamanoNov 10, 2026
  17. Srujith PoojaryNov 11, 2026
  18. Srujith PoojaryNov 11, 2026
  19. Junio C HamanoNov 10, 2026
  20. archive: remove USE_THE_REPOSITORY_VARIABLE from archival modulesSrujith A Poojary via GitGitGadget, Nov 11, 2026
  21. Karthik NayakNov 11, 2026
  22. Srujith PoojaryNov 11, 2026
  23. archive-tar: add comments explaining configuration precedenceSrujith A Poojary via GitGitGadget, Nov 11, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.