Re: [PATCH 13/20] unpack-trees: allow sparse directories
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Mar 9, 2021, 21:35 UTC
- Message-ID
- <4d5d12e9-cd14-c195-b267-0e130109f1e0@gmail.com>
- In-Reply-To
- <CABPp-BEMNavqAEG54VYkZvSiJ4=X3vZUXsubCmFfk3yxUWOjXQ@mail.gmail.com>
On 2/25/2021 2:40 AM, Elijah Newren wrote:
Show 20 quoted lines
> On Tue, Feb 23, 2021 at 12:14 PM Derrick Stolee via GitGitGadget > <gitgitgadget@gmail.com> wrote: >> >> From: Derrick Stolee <dstolee@microsoft.com> >> >> The index_pos_by_traverse_info() currently throws a BUG() when a >> directory entry exists exactly in the index. We need to consider that it >> is possible to have a directory in a sparse index as long as that entry >> is itself marked with the skip-worktree bit. >> >> The negation of the 'pos' variable must be conditioned to only when it >> starts as negative. This is identical behavior as before when the index >> is full. > > Same comment on the second paragraph as I made in the RFC series -- > https://lore.kernel.org/git/CABPp-BGPJgA4guWHVm3AVS=hM0fTixUpRvJe5i9NnHT-3QJMfw@mail.gmail.com/. > I apologize if I'm repeating stuff you chose to not change, but I > didn't see a response and given the three typos left in previous > patches, I'm unsure whether it was unaddressed on purpose or on > accident.
Yes, I dropped this one. How about this?
The 'pos' variable is assigned a negative value if an exact match is not
found. Since a directory name can be an exact match, it is no longer an
error to have a nonnegative 'pos' value.Thanks, -Stolee