setdiscovery: factorize similar sampling code
We are using full sampling of 'fullsamplesize' in both case. The only
difference is the debug message. So we factorise the sampling code and put the
message in an extra conditional.
This is going to help making changes around the sampling logic. Such changes are
needed to improve discovery performance on highly headed repository.
warning
error
'buffered\n'
colored? True
colored? True