threads / discuss / 25726

possible 'git --dirstat=0' buglet in 1.7.0.4?

Subject: possible 'git --dirstat=0' buglet in 1.7.0.4?

## tl;dr

2 messages between Nov 12, 2010 and Nov 16, 2010.

replies: 1people: 2as markdown or json

Mike Coleman· Nov 12, 2010, 14:33 UTC · lore

I noticed just now that the '--dirstat=0' flag still seems to filter out some diffs, even though I would expect the '0' to mean "don't filter anything". If there's another flag that says "don't filter", I missed it. Could this be a rounding or off-by-one error?

Mike
Junio C Hamano· Nov 16, 2010, 18:05 UTC · re: Mike Coleman · lore

Re: possible 'git --dirstat=0' buglet in 1.7.0.4?

Mike Coleman <tutufan@gmail.com> writes:
> I noticed just now that the '--dirstat=0' flag still seems to filter
> out some diffs, even though I would expect the '0' to mean "don't
> filter anything".  If there's another flag that says "don't filter", I
> missed it.  Could this be a rounding or off-by-one error?

We seem to internally compute in per-mille (see gather_dirstat() in diff.c) so if your changes are too small to be rounded off to zero there,...

I think you can remove the "if (permille)" there to make it not filter at all when dir->percent is set to 0, but I didn't look carefully.

← back to recent threads