Thread (184 messages) 184 messages, 6 authors, 2021-04-01

Re: [PATCH 13/20] unpack-trees: allow sparse directories

From: Derrick Stolee <hidden>
Date: 2021-03-09 21:36:26

On 2/25/2021 2:40 AM, Elijah Newren wrote:
On Tue, Feb 23, 2021 at 12:14 PM Derrick Stolee via GitGitGadget
[off-list ref] wrote:
quoted
From: Derrick Stolee <redacted>

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/ (local).
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help