summaryrefslogtreecommitdiff
path: root/fast-import.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2011-07-19 09:54:51 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-07-19 09:54:51 -0700
commitd907bf8ef327cd47433d4a4bb0a1bb4e96b6e340 (patch)
tree2475a33111f13c32a4e8540fb9d273bee0c5c601 /fast-import.c
parentMerge branch 'jn/mime-type-with-params' (diff)
parentverify-pack: use index-pack --verify (diff)
downloadtgif-d907bf8ef327cd47433d4a4bb0a1bb4e96b6e340.tar.xz
Merge branch 'jc/index-pack'
* jc/index-pack: verify-pack: use index-pack --verify index-pack: show histogram when emulating "verify-pack -v" index-pack: start learning to emulate "verify-pack -v" index-pack: a miniscule refactor index-pack --verify: read anomalous offsets from v2 idx file write_idx_file: need_large_offset() helper function index-pack: --verify write_idx_file: introduce a struct to hold idx customization options index-pack: group the delta-base array entries also by type Conflicts: builtin/verify-pack.c cache.h sha1_file.c
Diffstat (limited to 'fast-import.c')
-rw-r--r--fast-import.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fast-import.c b/fast-import.c
index 1d5e3336a5..9e8d1868aa 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -304,6 +304,7 @@ static unsigned int atom_cnt;
static struct atom_str **atom_table;
/* The .pack file being generated */
+static struct pack_idx_option pack_idx_opts;
static unsigned int pack_id;
static struct sha1file *pack_file;
static struct packed_git *pack_data;
@@ -896,7 +897,7 @@ static const char *create_index(void)
if (c != last)
die("internal consistency error creating the index");
- tmpfile = write_idx_file(NULL, idx, object_count, pack_data->sha1);
+ tmpfile = write_idx_file(NULL, idx, object_count, &pack_idx_opts, pack_data->sha1);
free(idx);
return tmpfile;
}
@@ -3195,10 +3196,10 @@ static int git_pack_config(const char *k, const char *v, void *cb)
return 0;
}
if (!strcmp(k, "pack.indexversion")) {
- pack_idx_default_version = git_config_int(k, v);
- if (pack_idx_default_version > 2)
+ pack_idx_opts.version = git_config_int(k, v);
+ if (pack_idx_opts.version > 2)
die("bad pack.indexversion=%"PRIu32,
- pack_idx_default_version);
+ pack_idx_opts.version);
return 0;
}
if (!strcmp(k, "pack.packsizelimit")) {
@@ -3252,6 +3253,7 @@ int main(int argc, const char **argv)
usage(fast_import_usage);
setup_git_directory();
+ reset_pack_idx_option(&pack_idx_opts);
git_config(git_pack_config, NULL);
if (!pack_compression_seen && core_compression_seen)
pack_compression_level = core_compression_level;