Re: [PATCH v2 04/10] commit-graph: compute generation numbers
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Apr 11, 2018, 19:26 UTC
- Message-ID
- <CAPig+cRHV0+iWS_+QdbJyuWpoXxknVbwngOS-BV4XFcyGRWGaw@mail.gmail.com>
- In-Reply-To
- <9ba7d27f-ce65-7f2c-601a-1bea3274104e@gmail.com>
On Wed, Apr 11, 2018 at 9:02 AM, Derrick Stolee <stolee@gmail.com> wrote:
Show 9 quoted lines
> 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.