git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Turner <dturner@twopensource.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, mhagger@alum.mit.edu, pclouds@gmail.com,
	sunshine@sunshineco.com
Subject: Re: [PATCH v4 2/4] path: optimize common dir checking
Date: Wed, 26 Aug 2015 18:10:31 -0400	[thread overview]
Message-ID: <1440627031.26055.5.camel@twopensource.com> (raw)
In-Reply-To: <xmqqwpwh21ky.fsf@gitster.dls.corp.google.com>

On Wed, 2015-08-26 at 14:15 -0700, Junio C Hamano wrote:
> > + * For example, consider the following set of strings:
> > + * abc
> > + * def
> > + * definite
> > + * definition
> > + *
> > + * The trie would look look like:
> > + * root: len = 0, value = (something), children a and d non-NULL.
> 
> "value = NULL", as there is no empty string registered in the trie?

Indeed.

> > + *    a: len = 2, contents = bc
> 
> "value = NULL" here, too (just showing I am following along, not
> just skimming)?

Yep.

<snip>
> > +	/* Partial path normalization: skip consecutive slashes */
> > +	while (key[0] == '/' && key[1] == '/')
> > +		key ++;
> 
> These "skipping consecutive slashes" inside this function is cute.
> I would have expected me to react "Eek, Ugly" to it, but somehow I
> didn't find them ugly.

It's right on the cute/ugly edge for me too.

<snip>

> I somehow wonder if we'd want to precomute the trie at the build
> time, though ;-)

LOL.

<snip>
> Thanks for a pleasant read.

Thank you!  I'll re-roll with those last two fixes (re value=NULL)
tomorrow-ish.

  reply	other threads:[~2015-08-26 22:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-26 19:46 [PATCH v4 0/4] per-worktree bisection refs David Turner
2015-08-26 19:46 ` [PATCH v4 1/4] refs: clean up common_list David Turner
2015-08-26 19:46 ` [PATCH v4 2/4] path: optimize common dir checking David Turner
2015-08-26 21:15   ` Junio C Hamano
2015-08-26 22:10     ` David Turner [this message]
2015-08-26 22:15       ` Junio C Hamano
2015-08-26 22:19       ` David Turner
2015-08-28 16:39         ` Junio C Hamano
2015-08-28 18:36           ` David Turner
2015-08-30  6:25   ` Torsten Bögershausen
2015-08-31 18:56     ` David Turner
2015-08-26 19:46 ` [PATCH v4 3/4] refs: make refs/worktree/* per-worktree David Turner
2015-08-26 19:46 ` [PATCH v4 4/4] bisect: make bisection refs per-worktree David Turner

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1440627031.26055.5.camel@twopensource.com \
    --to=dturner@twopensource.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mhagger@alum.mit.edu \
    --cc=pclouds@gmail.com \
    --cc=sunshine@sunshineco.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.
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 NNTP newsgroup(s).