Re: [PATCH 15/19] object-file: get rid of `the_repository` in `force_object_loose()`

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

 



Patrick Steinhardt <ps@xxxxxx> writes:

> On Fri, Jul 11, 2025 at 05:38:35AM -0500, Karthik Nayak wrote:
>> 
>> Q: Since it exists in the packed form, won't the check always return
>> true?
>
> I'm not quite sure I understand the question. This function is about
> _ensuring_ that the object exists in its loose format. So if it only
> exists in a packfile, it will be written in its loose format. If it
> already exists as a loose object, nothing happens.

The way I understand Karthik's question: We check all the odb->sources
for the object, so Karthik assumes (rightfully) one of the sources will
have the object, and thus the function early returns.

But when I look at the implementation of has_loose_object() it
eventually calls odb_loose_path() to find the object. So we check all
sources, but check if it exists in loose form only.


[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