git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff Hostetler <git@jeffhostetler.com>
To: "Junio C Hamano" <gitster@pobox.com>,
	"SZEDER Gábor" <szeder.dev@gmail.com>
Cc: git@vger.kernel.org, peff@peff.net,
	"Jeff Hostetler" <jeffhost@microsoft.com>,
	"René Scharfe" <l.s.r@web.de>,
	"Brandon Williams" <bwilliamseng@gmail.com>
Subject: Re: [PATCH v12 5/5] read-cache: speed up has_dir_name (part 2)
Date: Wed, 8 Jul 2020 09:49:05 -0400	[thread overview]
Message-ID: <be8dec3e-087e-b973-280d-3d0d2e481de6@jeffhostetler.com> (raw)
In-Reply-To: <xmqqr1tp9mf8.fsf@gitster.c.googlers.com>



On 7/6/20 2:39 AM, Junio C Hamano wrote:
> SZEDER Gábor <szeder.dev@gmail.com> writes:
> 
>>> +				 * last: xxx/yy-file (because '-' sorts before '/')
>>> +				 * this: xxx/yy/abc
>>
>> This is problematic, because the index can already contain 'xxx/yy' as
>> a file, when adding 'xxx/yy/abc', but since 'xxx/yy' as a file sorts
>> before 'xxx/yy-file', the short-circuiting here doesn't see it and
>> thus leaves the d-f collision undetected.  Consequently, even Git
>> porcelain commands can create tree objects with duplicate entries, as
>> demonstrated in the tests below.
> 
> Yeah, the "optimization" is quite bogus.  Thanks for catching it.
> 

yes, thanks!
Jeff

  reply	other threads:[~2020-07-08 13:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-19 17:06 [PATCH v12 0/5] read-cache: speed up add_index_entry git
2017-04-19 17:06 ` [PATCH v12 1/5] read-cache: add strcmp_offset function git
2017-04-19 17:06 ` [PATCH v12 2/5] p0006-read-tree-checkout: perf test to time read-tree git
2017-04-19 17:06 ` [PATCH v12 3/5] read-cache: speed up add_index_entry during checkout git
2017-04-19 17:06 ` [PATCH v12 4/5] read-cache: speed up has_dir_name (part 1) git
2017-04-19 17:06 ` [PATCH v12 5/5] read-cache: speed up has_dir_name (part 2) git
2020-07-04 17:27   ` SZEDER Gábor
2020-07-05  5:27     ` René Scharfe
2020-07-06  6:39     ` Junio C Hamano
2020-07-08 13:49       ` Jeff Hostetler [this message]
2020-07-16 17:11         ` René Scharfe

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=be8dec3e-087e-b973-280d-3d0d2e481de6@jeffhostetler.com \
    --to=git@jeffhostetler.com \
    --cc=bwilliamseng@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jeffhost@microsoft.com \
    --cc=l.s.r@web.de \
    --cc=peff@peff.net \
    --cc=szeder.dev@gmail.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).