Re: [PATCH v2] count-objects: output "KiB" instead of "kilobytes"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 3, 2013 at 4:38 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Mihai Capotă <mihai@xxxxxxxxx> writes:
>> diff --git a/git-cvsimport.perl b/git-cvsimport.perl
>> index 73d367c..de44e33 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
>> +if ($line =~ /^(\d+) objects, (\d+) KiB$/) {
>> +  my ($n_objects, $kib) = ($1, $2);
>> +  1024 < $kib
>>      and system(qw(git repack -a -d));
>>  }
>
> This hunk makes me wonder if this s/kilobytes/kib/ is a good idea in
> the first place.  This in-tree user was lucky enough to have been
> caught and adjusted, but we don't know how many out-of-tree scripts
> are broken the same way and in need of a similar treatment.

The git manual contains an explicit warning about the output of a
porcelain command changing: "The interface to Porcelain commands on
the other hand are subject to change in order to improve the end user
experience."

Mihai
--
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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]