Add pack.depth option to git-pack-objects.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
Theodore Ts'o committed
May 8, 2007 at 09:28 UTC
842aaf93238377976111fc801aaacbf8a491db33
4 files changed
+11
-3
Documentation/config.txt
+4
@@ -546,6 +546,10 @@ pack.window::
546
The size of the window used by gitlink:git-pack-objects[1] when no
547
window size is given on the command line. Defaults to 10.
548
549
+pack.depth::
550
+ The maximum delta depth used by gitlink:git-pack-objects[1] when no
551
+ maximum depth is given on the command line. Defaults to 10.
552
+
553
pull.octopus::
554
The default merge strategy to use when pulling multiple branches
555
at once.
Documentation/git-pack-objects.txt
+1
-1
@@ -83,7 +83,7 @@ base-name::
83
it too deep affects the performance on the unpacker
84
side, because delta data needs to be applied that many
85
times to get to the necessary object.
86
- The default value for both --window and --depth is 10.
86
+ The default value for --window is 10 and --depth is 10.
87
88
--incremental::
89
This flag causes an object already in a pack ignored
Documentation/git-repack.txt
+1
-1
@@ -63,7 +63,7 @@ OPTIONS
63
space. `--depth` limits the maximum delta depth; making it too deep
64
affects the performance on the unpacker side, because delta data needs
65
to be applied that many times to get to the necessary object.
66
- The default value for both --window and --depth is 10.
66
+ The default value for --window is 10 and --depth is 10.
67
68
69
Configuration
builtin-pack-objects.c
+5
-1
@@ -64,6 +64,7 @@ static char tmpname[PATH_MAX];
64
static unsigned char pack_file_sha1[20];
65
static int progress = 1;
66
static int window = 10;
67
+static int depth = 10;
68
static int pack_to_stdout;
69
static int num_preferred_base;
70
static struct progress progress_state;
@@ -1489,6 +1490,10 @@ static int git_pack_config(const char *k, const char *v)
1490
window = git_config_int(k, v);
1491
return 0;
1492
}
1493
+ if(!strcmp(k, "pack.depth")) {
1494
+ depth = git_config_int(k, v);
1495
+ return 0;
1496
+ }
1497
return git_default_config(k, v);
1498
}
1499
@@ -1584,7 +1589,6 @@ static int adjust_perm(const char *path, mode_t mode)
1589
1590
int cmd_pack_objects(int argc, const char **argv, const char *prefix)
1591
{
1587
- int depth = 10;
1592
int use_internal_rev_list = 0;
1593
int thin = 0;
1594
uint32_t i;