On Wed, Apr 11, 2018 at 9:02 AM, Derrick Stolee <stolee@xxxxxxxxx> wrote: > On 4/10/2018 10:51 PM, Junio C Hamano wrote: >> In case we want to do the "we know this is very large, but we do not >> know the exact value", we may actually want a mode where we can >> pretend that GENERATION_NUMBER_MAX is set to quite low (say 256) and >> make sure that the code to handle overflow behaves sensibly. > > I agree. I wonder how we can effectively expose this value into a test. It's > probably not sufficient to manually test using compiler flags ("-D > GENERATION_NUMBER_MAX=8"). A few similar cases of tests needing to tweak some behavior do so by environment variable. See, for instance, GIT_GETTEXT_POISON and GIT_FSMONITOR_TEST.