diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-11-04 01:11:17 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-11-04 01:11:17 -0700 |
commit | e091653951ae516a923338874bfe550894cd1bc9 (patch) | |
tree | e9620973ebe58be7edfb13e5df57f8e7262ce851 /index-pack.c | |
parent | 2dfffd3e09b2541b1bfcc840a65eac0251832175 (diff) | |
parent | 79814f425c00129dbdbdc3c99d04af52ccc58254 (diff) | |
download | git-e091653951ae516a923338874bfe550894cd1bc9.tar.gz |
Merge branch 'np/pack'
* np/pack:
pack-objects: get rid of an ugly cast
make the pack index version configurable
Conflicts:
builtin-pack-objects.c
Diffstat (limited to 'index-pack.c')
-rw-r--r-- | index-pack.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/index-pack.c b/index-pack.c index 61ea7621be..715a5bb7a6 100644 --- a/index-pack.c +++ b/index-pack.c @@ -683,6 +683,17 @@ static void final(const char *final_pack_name, const char *curr_pack_name, } } +static int git_index_pack_config(const char *k, const char *v) +{ + if (!strcmp(k, "pack.indexversion")) { + pack_idx_default_version = git_config_int(k, v); + if (pack_idx_default_version > 2) + die("bad pack.indexversion=%d", pack_idx_default_version); + return 0; + } + return git_default_config(k, v); +} + int main(int argc, char **argv) { int i, fix_thin_pack = 0; @@ -693,6 +704,8 @@ int main(int argc, char **argv) struct pack_idx_entry **idx_objects; unsigned char sha1[20]; + git_config(git_index_pack_config); + for (i = 1; i < argc; i++) { char *arg = argv[i]; |