Frontends can use this file to validate imports after they
have been completed.
+--quiet::
+ Disable all non-fatal output, making gfi silent when it
+ is successful. This option disables the output shown by
+ \--stats.
+
+--stats::
+ Display some basic statistics about the objects gfi has
+ created, the packfiles they were stored into, and the
+ memory used by gfi during this run. Showing this output
+ is currently the default, but can be disabled with \--quiet.
+
+
Performance
-----------
The design of gfi allows it to import large projects in a minimum
prints a warning message. gfi will always attempt to update all
branch refs, and does not stop on the first failure.
-Branch updates can be forced with `--force`, but its recommended that
-this only be used on an otherwise quiet repository. Using `--force`
+Branch updates can be forced with \--force, but its recommended that
+this only be used on an otherwise quiet repository. Using \--force
is not necessary for an initial import into an empty repository.
~~~~~~~~~~~~
The following date formats are supported. A frontend should select
the format it will use for this import by passing the format name
-in the `--date-format=<fmt>` command line option.
+in the \--date-format=<fmt> command line option.
`raw`::
This is the Git native format and is `<time> SP <offutc>`.
- It is also gfi's default format, if `--date-format` was
+ It is also gfi's default format, if \--date-format was
not specified.
+
The time of the event is specified by `<time>` as the number of
`LT` and `LF`. It is typically UTF-8 encoded.
The time of the change is specified by `<when>` using the date format
-that was selected by the `--date-format=<fmt>` command line option.
+that was selected by the \--date-format=<fmt> command line option.
See ``Date Formats'' above for the set of supported formats, and
their syntax.
gfi automatically moves active branches to inactive status based on
a simple least-recently-used algorithm. The LRU chain is updated on
each `commit` command. The maximum number of active branches can be
-increased or decreased on the command line with `--active-branches=`.
+increased or decreased on the command line with \--active-branches=.
per active tree
~~~~~~~~~~~~~~~
int main(int argc, const char **argv)
{
- int i;
- uintmax_t total_count, duplicate_count;
+ int i, show_stats = 1;
git_config(git_default_config);
mark_file = a + 15;
else if (!strcmp(a, "--force"))
force_update = 1;
+ else if (!strcmp(a, "--quiet"))
+ show_stats = 0;
+ else if (!strcmp(a, "--stats"))
+ show_stats = 1;
else
die("unknown option %s", a);
}
unkeep_all_packs();
dump_marks();
- total_count = 0;
- for (i = 0; i < ARRAY_SIZE(object_count_by_type); i++)
- total_count += object_count_by_type[i];
- duplicate_count = 0;
- for (i = 0; i < ARRAY_SIZE(duplicate_count_by_type); i++)
- duplicate_count += duplicate_count_by_type[i];
-
- fprintf(stderr, "%s statistics:\n", argv[0]);
- fprintf(stderr, "---------------------------------------------------------------------\n");
- fprintf(stderr, "Alloc'd objects: %10ju\n", alloc_count);
- fprintf(stderr, "Total objects: %10ju (%10ju duplicates )\n", total_count, duplicate_count);
- 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]);
- 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]);
- fprintf(stderr, " commits: %10ju (%10ju duplicates %10ju deltas)\n", object_count_by_type[OBJ_COMMIT], duplicate_count_by_type[OBJ_COMMIT], delta_count_by_type[OBJ_COMMIT]);
- fprintf(stderr, " tags : %10ju (%10ju duplicates %10ju deltas)\n", object_count_by_type[OBJ_TAG], duplicate_count_by_type[OBJ_TAG], delta_count_by_type[OBJ_TAG]);
- fprintf(stderr, "Total branches: %10lu (%10lu loads )\n", branch_count, branch_load_count);
- fprintf(stderr, " marks: %10ju (%10ju unique )\n", (((uintmax_t)1) << marks->shift) * 1024, marks_set_count);
- fprintf(stderr, " atoms: %10u\n", atom_cnt);
- fprintf(stderr, "Memory total: %10ju KiB\n", (total_allocd + alloc_count*sizeof(struct object_entry))/1024);
- fprintf(stderr, " pools: %10lu KiB\n", total_allocd/1024);
- fprintf(stderr, " objects: %10ju KiB\n", (alloc_count*sizeof(struct object_entry))/1024);
- fprintf(stderr, "---------------------------------------------------------------------\n");
- pack_report();
- fprintf(stderr, "---------------------------------------------------------------------\n");
- fprintf(stderr, "\n");
+ if (show_stats) {
+ uintmax_t total_count = 0, duplicate_count = 0;
+ for (i = 0; i < ARRAY_SIZE(object_count_by_type); i++)
+ total_count += object_count_by_type[i];
+ for (i = 0; i < ARRAY_SIZE(duplicate_count_by_type); i++)
+ duplicate_count += duplicate_count_by_type[i];
+
+ fprintf(stderr, "%s statistics:\n", argv[0]);
+ fprintf(stderr, "---------------------------------------------------------------------\n");
+ fprintf(stderr, "Alloc'd objects: %10ju\n", alloc_count);
+ fprintf(stderr, "Total objects: %10ju (%10ju duplicates )\n", total_count, duplicate_count);
+ 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]);
+ 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]);
+ fprintf(stderr, " commits: %10ju (%10ju duplicates %10ju deltas)\n", object_count_by_type[OBJ_COMMIT], duplicate_count_by_type[OBJ_COMMIT], delta_count_by_type[OBJ_COMMIT]);
+ fprintf(stderr, " tags : %10ju (%10ju duplicates %10ju deltas)\n", object_count_by_type[OBJ_TAG], duplicate_count_by_type[OBJ_TAG], delta_count_by_type[OBJ_TAG]);
+ fprintf(stderr, "Total branches: %10lu (%10lu loads )\n", branch_count, branch_load_count);
+ fprintf(stderr, " marks: %10ju (%10ju unique )\n", (((uintmax_t)1) << marks->shift) * 1024, marks_set_count);
+ fprintf(stderr, " atoms: %10u\n", atom_cnt);
+ fprintf(stderr, "Memory total: %10ju KiB\n", (total_allocd + alloc_count*sizeof(struct object_entry))/1024);
+ fprintf(stderr, " pools: %10lu KiB\n", total_allocd/1024);
+ fprintf(stderr, " objects: %10ju KiB\n", (alloc_count*sizeof(struct object_entry))/1024);
+ fprintf(stderr, "---------------------------------------------------------------------\n");
+ pack_report();
+ fprintf(stderr, "---------------------------------------------------------------------\n");
+ fprintf(stderr, "\n");
+ }
return failure ? 1 : 0;
}