Re: [PATCH 8/8] submodule: fix bug and remove add_submodule_odb()

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

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> Jonathan Tan <jonathantanmy@xxxxxxxxxx> writes:
>
>> I would write the commit message like this:
>>
>>   submodule: fix latent check_has_commit() bug
>>
>>   check_has_commit() will attempt to clear a non-initialized struct
>>   repository if initialization fails. This bug is masked by its only
>>   caller, submodule_has_commits(), first calling add_submodule_odb().
>>   The latter fails if the repo does not exist, making
>>   submodule_has_commits() exit early and not invoke check_has_commit()
>>   in a situation in which initialization would fail.
>>
>>   Fix this bug, and because calling add_submodule_odb() is no longer
>>   necessary as of 13a2f620b2 (submodule: pass repo to
>>   check_has_commit(), 2021-10-08), remove that call too.
>>
>>   This is the last caller of add_submodule_odb(), so remove that
>>   function. (Adding submodule ODBs as alternates is still present in the
>>   form of add_submodule_odb_by_path().)
>
> Looks more clearly explained.  
>
> We still end up calling add_to_alternate_memory(), so I take the
> "let's have this early" back.

Ok, so I won't send this patch separately. Thanks Jonathan for making
things clearer :)



[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