Re: [PATCH] Avoid using dc in git-count-objects

From: Andreas Ericsson <ae@op5.se>
Date: 2005-10-26 19:23:17
Junio C Hamano wrote:
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> 
>>Using dc is not really necessary, since expr understands summing 32 bit 
>>signed integers. Which means that git-count-objects will now fail when 2 
>>GB of unpacked objects have accumulated.
> 
> 
> Sorry, but I am not very happy about this patch.  "local"
> bashism aside, doesn't this spawn expr for every unpacked
> object?
> 

I'd be more worried about the fact that the kilobytes count is way off 
as it is. du (at least from coreutils-5.2.1) rounds up to nearest 
kilobyte *for each file* when printing kb-count.

Try these:
    du -skc .git/objects/?? | grep total
    du -skc .git/objects/??/* | grep total
    du -sbc .git/objects/?? | grep total
    du -sbc .git/objects/??/* | grep total

which will all yield different values.

I have no idea which of those values people expect to get back, so it 
might be correct right now, although I doubt it.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Oct 26 19:23:52 2005

This archive was generated by hypermail 2.1.8 : 2005-10-26 19:23:55 EST