threads / patch / 63261

patchenvironment.h: remove unused variables

Subject: [GSoC PATCH] environment.h: remove unused variables

## tl;dr

2 messages between Apr 5, 2025 and Apr 7, 2025. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Arnav Bhate· Apr 5, 2025, 16:45 UTC · lore

packed_git_window_size and packed_git_limit are not used anywhere in the codebase. A search found that all references were removed in d284713bae (config: make `packed_git_(limit|window_size)` non-global variables, 2024-12-03), except the ones in this file, as they were moved to struct repo_settings.

Remove packed_git_window_size and packed_git_limit from environment.h.
Signed-off-by: Arnav Bhate <bhatearnav@gmail.com>
---
 environment.h | 2 --
 1 file changed, 2 deletions(-)
Show changes to environment.h +0 −2
diff --git a/environment.h b/environment.h
index 45e690f203..cf6fc04e70 100644
--- a/environment.h
+++ b/environment.h
@@ -152,8 +152,6 @@ extern char *apply_default_ignorewhitespace;
 extern char *git_attributes_file;
 extern int zlib_compression_level;
 extern int pack_compression_level;
-extern size_t packed_git_window_size;
-extern size_t packed_git_limit;
 extern unsigned long big_file_threshold;
 extern unsigned long pack_size_limit_cfg;
 extern int max_allowed_tree_depth;
-- 
2.49.0
Patrick Steinhardt· Apr 7, 2025, 08:03 UTC · re: Arnav Bhate · lore

Re: [GSoC PATCH] environment.h: remove unused variables

On Sat, Apr 05, 2025 at 10:15:32PM +0530, Arnav Bhate wrote:
Show 26 quoted lines
> packed_git_window_size and packed_git_limit are not used anywhere in
> the codebase. A search found that all references were removed in
> d284713bae (config: make `packed_git_(limit|window_size)` non-global
> variables, 2024-12-03), except the ones in this file, as they were moved
> to struct repo_settings.
> 
> Remove packed_git_window_size and packed_git_limit from environment.h.
> 
> Signed-off-by: Arnav Bhate <bhatearnav@gmail.com>
> ---
>  environment.h | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/environment.h b/environment.h
> index 45e690f203..cf6fc04e70 100644
> --- a/environment.h
> +++ b/environment.h
> @@ -152,8 +152,6 @@ extern char *apply_default_ignorewhitespace;
>  extern char *git_attributes_file;
>  extern int zlib_compression_level;
>  extern int pack_compression_level;
> -extern size_t packed_git_window_size;
> -extern size_t packed_git_limit;
>  extern unsigned long big_file_threshold;
>  extern unsigned long pack_size_limit_cfg;
>  extern int max_allowed_tree_depth;
Good catch indeed, the patch looks obviously good to me!
Patrick

← back to recent threads