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

[PATCH] compression: drop write-only core_compression_* variables

From
René Scharfe <l.s.r@web.de>
Date
Sep 11, 2021, 11:45 UTC
Message-ID
<6ed7da24-81d0-0b5e-dca3-664d2c773474@web.de>

Since 8de7eeb54b (compression: unify pack.compression configuration parsing, 2016-11-15) the variables core_compression_level and core_compression_seen are only set, but never read. Remove them.

Signed-off-by: René Scharfe <l.s.r@web.de>
---
 cache.h       | 1 -
 config.c      | 3 ---
 environment.c | 1 -
 3 files changed, 5 deletions(-)
diff --git a/cache.h b/cache.h
index d23de69368..933bd33e69 100644
--- a/cache.h
+++ b/cache.h
@@ -958,7 +958,6 @@ extern char *apply_default_ignorewhitespace;
 extern const char *git_attributes_file;
 extern const char *git_hooks_path;
 extern int zlib_compression_level;
-extern int core_compression_level;
 extern int pack_compression_level;
 extern size_t packed_git_window_size;
 extern size_t packed_git_limit;
diff --git a/config.c b/config.c
index cb4a8058bf..7eca6aff8b 100644
--- a/config.c
+++ b/config.c
@@ -76,7 +76,6 @@ static struct key_value_info *current_config_kvi;
  */
 static enum config_scope current_parsing_scope;

-static int core_compression_seen;
 static int pack_compression_seen;
 static int zlib_compression_seen;

@@ -1400,8 +1399,6 @@ static int git_default_core_config(const char *var, const char *value, void *cb)
 			level = Z_DEFAULT_COMPRESSION;
 		else if (level < 0 || level > Z_BEST_COMPRESSION)
 			die(_("bad zlib compression level %d"), level);
-		core_compression_level = level;
-		core_compression_seen = 1;
 		if (!zlib_compression_seen)
 			zlib_compression_level = level;
 		if (!pack_compression_seen)
diff --git a/environment.c b/environment.c
index d6b22ede7e..b4ba4fa22d 100644
--- a/environment.c
+++ b/environment.c
@@ -41,7 +41,6 @@ char *apply_default_ignorewhitespace;
 const char *git_attributes_file;
 const char *git_hooks_path;
 int zlib_compression_level = Z_BEST_SPEED;
-int core_compression_level;
 int pack_compression_level = Z_DEFAULT_COMPRESSION;
 int fsync_object_files;
 size_t packed_git_window_size = DEFAULT_PACKED_GIT_WINDOW_SIZE;
--
2.33.0
Next: Jeff King
Message 1 of 2 in “compression: drop write-only core_compression_* variables”
  1. compression: drop write-only core_compression_* variablesRené Scharfe, Sep 11, 2021
  2. Jeff KingSep 11, 2021

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.