On Tue, Mar 9, 2021 at 1:35 PM Derrick Stolee <stolee@xxxxxxxxx> wrote: > > On 2/25/2021 2:40 AM, Elijah Newren wrote: > > On Tue, Feb 23, 2021 at 12:14 PM Derrick Stolee via GitGitGadget > > <gitgitgadget@xxxxxxxxx> wrote: > >> > >> From: Derrick Stolee <dstolee@xxxxxxxxxxxxx> > >> > >> 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@xxxxxxxxxxxxxx/. > > 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. I like it!