Re: [PATCH 5/6] Use floating point for --dirstat percentages
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Apr 27, 2011, 04:53 UTC
- Message-ID
- <BANLkTikWhRiDaojR2NipcP0kpP49we5iUQ@mail.gmail.com>
- In-Reply-To
- <7vipu0b8zy.fsf@alter.siamese.dyndns.org>
On Tue, Apr 26, 2011 at 9:42 PM, Junio C Hamano <gitster@pobox.com> wrote:
> > If that is the case, I would rather not see us use floating point for > this.
Considering that we still just output with a tenth of a percent granularity, I'd suggest just continuing with using permille internally - including for the limit.
So instead of actually using floating point, just parsing a single digit worth of fractional percent would be beautiful. IOW, being able to say
--dirstat=1.5
to give a 1.5% cut-off point would be really nice - but then internally just saying "15 permille" and using integers all the way?
Doing all the fake floating point by hand also obviously then avoids the whole LC_NUMERIC locale issue.
Linus