Re: [PATCH v2 24/25] sparse-index: expand_to_path()
On 4/5/2021 3:32 PM, Elijah Newren wrote:
Show 22 quoted lines
> On Wed, Mar 31, 2021 at 6:50 PM Derrick Stolee via GitGitGadget
> <gitgitgadget@gmail.com> wrote:
>>
>> From: Derrick Stolee <dstolee@microsoft.com>>> + if (index_file_exists(istate, path_mutable.buf,
>> + path_mutable.len, icase)) {
>> + /*
>> + * We found a parent directory in the name-hash
>> + * hashtable, which means that this entry could
>> + * exist within a sparse-directory entry. Expand
>> + * accordingly.
>
> "this entry" is a bit unclear; it might be worth referring to the
> "path" variable instead. I think it'd also help to explain the
> reasoning for using the '/' character, because while it's clear when
> looking at the series, just running across it in the code it might be
> easy to forget or miss. Perhaps:
>
> * We found a parent directory in the name-hash
> * hashtable, because only sparse directory entries
> * have a trailing '/' character. Since "path" wasn't
> * in the index, perhaps it exists within this
> * sparse-directory. Expand accordingly.A good recommendation. Thanks.
-Stolee