224
/* Configured limits on output */
225
static unsigned long max_depth = 10;
226
static unsigned long max_packsize = (1LL << 32) - 1;
227
-static uintmax_t max_objects = -1;
227
228
/* Stats and misc. counters */
229
static uintmax_t alloc_count;
899
deflateEnd(&s);
900
901
/* Determine if we should auto-checkpoint. */
903
- if ((object_count + 1) > max_objects
904
- || (object_count + 1) < object_count
905
- || (pack_size + 60 + s.total_out) > max_packsize
902
+ if ((pack_size + 60 + s.total_out) > max_packsize
903
|| (pack_size + 60 + s.total_out) < pack_size) {
904
905
/* This new object needs to *not* have the current pack_id. */
1869
}
1870
1871
static const char fast_import_usage[] =
1875
-"git-fast-import [--objects=n] [--depth=n] [--active-branches=n] [--export-marks=marks.file] [--branch-log=log]";
1872
+"git-fast-import [--depth=n] [--active-branches=n] [--export-marks=marks.file] [--branch-log=log]";
1873
1874
int main(int argc, const char **argv)
1875
{
1876
int i;
1880
- uintmax_t est_obj_cnt = object_entry_alloc;
1877
uintmax_t total_count, duplicate_count;
1878
1879
setup_ident();
1884
1885
if (*a != '-' || !strcmp(a, "--"))
1886
break;
1891
- else if (!strncmp(a, "--objects=", 10))
1892
- est_obj_cnt = strtoumax(a + 10, NULL, 0);
1893
- else if (!strncmp(a, "--max-objects-per-pack=", 23))
1894
- max_objects = strtoumax(a + 23, NULL, 0);
1887
else if (!strncmp(a, "--max-pack-size=", 16))
1888
max_packsize = strtoumax(a + 16, NULL, 0) * 1024 * 1024;
1889
else if (!strncmp(a, "--depth=", 8))
1903
if (i != argc)
1904
usage(fast_import_usage);
1905
1914
- alloc_objects(est_obj_cnt);
1906
+ alloc_objects(object_entry_alloc);
1907
strbuf_init(&command_buf);
1908
1909
atom_table = xcalloc(atom_table_sz, sizeof(struct atom_str*));
1947
1948
fprintf(stderr, "%s statistics:\n", argv[0]);
1949
fprintf(stderr, "---------------------------------------------------------------------\n");
1958
- fprintf(stderr, "Alloc'd objects: %10ju (%10ju overflow )\n", alloc_count, alloc_count - est_obj_cnt);
1950
+ fprintf(stderr, "Alloc'd objects: %10ju\n", alloc_count);
1951
fprintf(stderr, "Total objects: %10ju (%10ju duplicates )\n", total_count, duplicate_count);
1952
fprintf(stderr, " blobs : %10ju (%10ju duplicates %10ju deltas)\n", object_count_by_type[OBJ_BLOB], duplicate_count_by_type[OBJ_BLOB], delta_count_by_type[OBJ_BLOB]);
1953
fprintf(stderr, " trees : %10ju (%10ju duplicates %10ju deltas)\n", object_count_by_type[OBJ_TREE], duplicate_count_by_type[OBJ_TREE], delta_count_by_type[OBJ_TREE]);