Re: [PATCH] Avoid using dc in git-count-objects
- From
Andreas Ericsson <ae@op5.se>
- Date
- Oct 26, 2005, 09:23 UTC
- Message-ID
- <435F4B05.4010702@op5.se>
- In-Reply-To
- <7vd5ltcf05.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 12 quoted lines
> 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 totalwhich 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