Re: [PATCH v2 6/8] commit-reach: implement ahead_behind() logic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/15/2023 12:03 PM, Junio C Hamano wrote:
> Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes:
> 
>>> +	/**
>>> +	 * These values store the computed counts for each side of the
>>> +	 * symmetric difference:
>>> +	 *
>>> +	 * 'ahead' stores the number of commits reachable from the tip
>>> +	 * and not reachable from the base.
>>> +	 *
>>> +	 * 'behind' stores the number of commits reachable from the base
>>> +	 * and not reachable from the tip.
>>> +	 */
>>> +	unsigned int ahead;
>>> +	unsigned int behind;
>>
>> Even though this is the tip of the iceberg in terms of our codebase
>> overall, can't we just use "size_t" for counts in new APIs?
> 
> I personally do not see a point in becoming so dogmatic.  Plain
> (possibly) 32-bit integers have their places in the code.

In particular, we have 32-bit limits on the commit-graph due
to it being unreasonable to have billions of commits in a
repository.

Thanks,
-Stolee



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux