Document the use of kibibytes, not kilobytes, in the output of count-objects and the reason for not correcting the output. Also, make cvsimport comment and variable name reflect unit actually used. Signed-off-by: Mihai Capotă <mihai@xxxxxxxxx> --- Documentation/git-count-objects.txt | 7 +++++++ git-cvsimport.perl | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Documentation/git-count-objects.txt b/Documentation/git-count-objects.txt index 23c80ce..d562dad 100644 --- a/Documentation/git-count-objects.txt +++ b/Documentation/git-count-objects.txt @@ -26,6 +26,13 @@ OPTIONS and number of objects that can be removed by running `git prune-packed`. + +BUGS +---- +Consumed space is actually expressed in kibibytes, not kilobytes as stated in +the output. The output is kept as it is for compatibility reasons. + + GIT --- Part of the linkgit:git[1] suite diff --git a/git-cvsimport.perl b/git-cvsimport.perl index 73d367c..6803f04 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -1126,12 +1126,12 @@ unless ($opt_P) { } # The heuristic of repacking every 1024 commits can leave a -# lot of unpacked data. If there is more than 1MB worth of +# lot of unpacked data. If there is more than 1MiB worth of # not-packed objects, repack once more. my $line = `git count-objects`; if ($line =~ /^(\d+) objects, (\d+) kilobytes$/) { - my ($n_objects, $kb) = ($1, $2); - 1024 < $kb + my ($n_objects, $kib) = ($1, $2); + 1024 < $kib and system(qw(git repack -a -d)); } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html