diff --git a/index-pack.c b/index-pack.c
index 61ea7621bef3d653b3b88ba89801305b95a8d1a7..715a5bb7a6e42694b3e35de703e44e792a5442fe 100644 (file)
--- a/index-pack.c
+++ b/index-pack.c
}
}
}
}
+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;
int main(int argc, char **argv)
{
int i, fix_thin_pack = 0;
struct pack_idx_entry **idx_objects;
unsigned char sha1[20];
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];
for (i = 1; i < argc; i++) {
char *arg = argv[i];