From: Derrick Stolee <stolee@gmail.com>
To: Elijah Newren <newren@gmail.com>,
Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>,
Victoria Dye <vdye@github.com>,
Junio C Hamano <gitster@pobox.com>,
Derrick Stolee <derrickstolee@github.com>,
Derrick Stolee <dstolee@microsoft.com>
Subject: Re: [PATCH 2/2] unpack-trees: use traverse_path instead of name
Date: Mon, 6 Dec 2021 08:59:07 -0500 [thread overview]
Message-ID: <166c107e-1884-ca53-fa46-12b39e6af13f@gmail.com> (raw)
In-Reply-To: <CABPp-BEs8_F7SKsxDMd8p03oMn9M3H47=hrPP=AzxsacUkGg_A@mail.gmail.com>
On 12/4/2021 12:42 AM, Elijah Newren wrote:
> On Fri, Dec 3, 2021 at 6:55 PM Derrick Stolee via GitGitGadget
> <gitgitgadget@gmail.com> wrote:
>> @@ -1243,11 +1243,11 @@ static int sparse_dir_matches_path(const struct cache_entry *ce,
>> assert(S_ISSPARSEDIR(ce->ce_mode));
>> assert(ce->name[ce->ce_namelen - 1] == '/');
>>
>> - if (info->namelen)
>> - return ce->ce_namelen == info->namelen + p->pathlen + 2 &&
>> - ce->name[info->namelen] == '/' &&
>> - !strncmp(ce->name, info->name, info->namelen) &&
>> - !strncmp(ce->name + info->namelen + 1, p->path, p->pathlen);
>> + if (info->pathlen)
>> + return ce->ce_namelen == info->pathlen + p->pathlen + 1 &&
>> + ce->name[info->pathlen - 1] == '/' &&
>> + !strncmp(ce->name, info->traverse_path, info->pathlen) &&
>> + !strncmp(ce->name + info->pathlen, p->path, p->pathlen);
>> return ce->ce_namelen == p->pathlen + 1 &&
>> !strncmp(ce->name, p->path, p->pathlen);
>> }
>> --
>
> The comment at the beginning of this function (not shown in this
> patch) is now stale and misleading; it should be corrected too.
Will do! Thanks for catching that.
Thanks,
-Stolee
next prev parent reply other threads:[~2021-12-06 13:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-04 2:55 [PATCH 0/2] Sparse Index: fix a checkout bug with deep sparse-checkout patterns Derrick Stolee via GitGitGadget
2021-12-04 2:55 ` [PATCH 1/2] t1092: add deeper changes during a checkout Derrick Stolee via GitGitGadget
2021-12-04 2:55 ` [PATCH 2/2] unpack-trees: use traverse_path instead of name Derrick Stolee via GitGitGadget
2021-12-04 5:42 ` Elijah Newren
2021-12-06 13:59 ` Derrick Stolee [this message]
2021-12-04 5:45 ` [PATCH 0/2] Sparse Index: fix a checkout bug with deep sparse-checkout patterns Elijah Newren
2021-12-06 14:10 ` [PATCH v2 " Derrick Stolee via GitGitGadget
2021-12-06 14:10 ` [PATCH v2 1/2] t1092: add deeper changes during a checkout Derrick Stolee via GitGitGadget
2021-12-06 14:10 ` [PATCH v2 2/2] unpack-trees: use traverse_path instead of name Derrick Stolee via GitGitGadget
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=166c107e-1884-ca53-fa46-12b39e6af13f@gmail.com \
--to=stolee@gmail.com \
--cc=derrickstolee@github.com \
--cc=dstolee@microsoft.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=newren@gmail.com \
--cc=vdye@github.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).