Re: [PATCH v2 1/9] object-file: move `safe_create_leading_directories()` into "dir.c"

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

 



Patrick Steinhardt <ps@xxxxxx> writes:

> On Fri, Apr 11, 2025 at 05:29:13PM -0400, Eric Sunshine wrote:
>> On Fri, Apr 11, 2025 at 4:10 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>> > Patrick Steinhardt <ps@xxxxxx> writes:
>> > > The `safe_create_leading_directories()` function and its relatives are
>> > > located in "object-file.c", which is not a good fit as they provide
>> > > generic functionality not related to objects at all. Move them into
>> > > "dir.c".
>> >
>> > It may be debatable that <dir.c>, which has traditionally been a
>> > collection of read-only operations (mostly for exclude/ignore
>> > processing), is a good place to host "mkdir -p", but it certainly is
>> > better than having it in <object-file.c>
>> 
>> I probably would have expected safe_create_leading_directories() to be
>> moved to "path.[hc]" which already houses functions such as
>> safe_create_dir(), normalize_path_copy(), ends_with_path_components(),
>> longest_ancestor_length(), etc.
>
> Ah, good catch! Will adapt.

Yeah, path.* API sounds like a better fit, indeed.

Thanks, both.




[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