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

[PATCH] Add pack.depth option to git-pack-objects and change default depth to 50

From
Theodore Ts'o <tytso@mit.edu>
Date
May 8, 2007, 13:28 UTC
Message-ID
<11786309072612-git-send-email-tytso@mit.edu>
In-Reply-To
<11786309073709-git-send-email-tytso@mit.edu>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
 Documentation/config.txt           |    6 +++++-
 Documentation/git-pack-objects.txt |    2 +-
 Documentation/git-repack.txt       |    2 +-
 builtin-pack-objects.c             |    6 +++++-
 4 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 24f9655..c7674c2 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -544,7 +544,11 @@ merge.<driver>.recursive::
 
 pack.window::
 	The size of the window used by gitlink:git-pack-objects[1] when no
-	window size is given on the command line. Defaults to 10.
+	window size is given on the command line.  Defaults to 10.
+
+pack.depth::
+	The maximum delta depth used by gitlink:git-pack-objects[1] when no
+	maximum depth is given on the command line.  Defaults to 50.
 
 pull.octopus::
 	The default merge strategy to use when pulling multiple branches
diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt
index d9e11c6..bd3ee45 100644
--- a/Documentation/git-pack-objects.txt
+++ b/Documentation/git-pack-objects.txt
@@ -83,7 +83,7 @@ base-name::
 	it too deep affects the performance on the unpacker
 	side, because delta data needs to be applied that many
 	times to get to the necessary object.
-	The default value for both --window and --depth is 10.
+	The default value for --window is 10 and --depth is 50.
 
 --incremental::
 	This flag causes an object already in a pack ignored
diff --git a/Documentation/git-repack.txt b/Documentation/git-repack.txt
index d39abc1..cc3b0b2 100644
--- a/Documentation/git-repack.txt
+++ b/Documentation/git-repack.txt
@@ -63,7 +63,7 @@ OPTIONS
 	space. `--depth` limits the maximum delta depth; making it too deep
 	affects the performance on the unpacker side, because delta data needs
 	to be applied that many times to get to the necessary object.
-	The default value for both --window and --depth is 10.
+	The default value for --window is 10 and --depth is 50.
 
 
 Configuration
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 7bff8ea..966f843 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -64,6 +64,7 @@ static char tmpname[PATH_MAX];
 static unsigned char pack_file_sha1[20];
 static int progress = 1;
 static int window = 10;
+static int depth = 50;
 static int pack_to_stdout;
 static int num_preferred_base;
 static struct progress progress_state;
@@ -1489,6 +1490,10 @@ static int git_pack_config(const char *k, const char *v)
 		window = git_config_int(k, v);
 		return 0;
 	}
+	if(!strcmp(k, "pack.depth")) {
+		depth = git_config_int(k, v);
+		return 0;
+	}
 	return git_default_config(k, v);
 }
 
@@ -1584,7 +1589,6 @@ static int adjust_perm(const char *path, mode_t mode)
 
 int cmd_pack_objects(int argc, const char **argv, const char *prefix)
 {
-	int depth = 10;
 	int use_internal_rev_list = 0;
 	int thin = 0;
 	uint32_t i;
-- 
1.5.2.rc2.22.ga39d
Previous: Theodore Ts'oNext: Theodore Ts'o
Message 7 of 40 in “Add --no-reuse-delta, --window, and --depth options to git-gc”
  1. Add --no-reuse-delta, --window, and --depth options to git-gcTheodore Ts'o, May 8, 2007
  2. Nicolas PitreMay 8, 2007
  3. Theodore TsoMay 8, 2007
  4. Dana HowMay 8, 2007
  5. Junio C HamanoMay 8, 2007
  6. Theodore Ts'oMay 8, 2007
  7. Add pack.depth option to git-pack-objects and change default depth to 50Theodore Ts'o, May 8, 2007
  8. Add --no-reuse-delta option to git-gcTheodore Ts'o, May 8, 2007
  9. Nicolas PitreMay 8, 2007
  10. Daniel BarkalowMay 9, 2007
  11. Junio C HamanoMay 9, 2007
  12. Steven GrimmMay 9, 2007
  13. Johannes SchindelinMay 9, 2007
  14. Junio C HamanoMay 9, 2007
  15. Shawn O. PearceMay 9, 2007
  16. Sam VilainJun 10, 2007
  17. Nicolas PitreJun 11, 2007
  18. Steven GrimmJun 11, 2007
  19. Shawn O. PearceJun 11, 2007
  20. Johannes SchindelinJun 11, 2007
  21. Nicolas PitreJun 11, 2007
  22. Johannes SchindelinJun 11, 2007
  23. Add --aggressive option to 'git gc'Theodore Tso, May 9, 2007
  24. Junio C HamanoMay 9, 2007
  25. Theodore TsoMay 9, 2007
  26. Junio C HamanoMay 10, 2007
  27. Nicolas PitreMay 8, 2007
  28. Theodore TsoMay 8, 2007
  29. Johannes SchindelinMay 8, 2007
  30. Theodore TsoMay 8, 2007
  31. Nicolas PitreMay 8, 2007
  32. Theodore TsoMay 9, 2007
  33. Johannes SchindelinMay 9, 2007
  34. Dana HowMay 8, 2007
  35. Nicolas PitreMay 8, 2007
  36. Junio C HamanoMay 9, 2007
  37. Nicolas PitreMay 8, 2007
  38. Junio C HamanoMay 8, 2007
  39. Nicolas PitreMay 8, 2007
  40. Nicolas PitreMay 8, 2007

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.