git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pierre Habouzit <madcoder@debian.org>
To: Lars Knoll <lars@trolltech.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Speedup scanning for excluded files.
Date: Mon, 29 Oct 2007 09:02:34 +0100	[thread overview]
Message-ID: <20071029080234.GA22826@artemis.corp> (raw)
In-Reply-To: <200710290845.26727.lars@trolltech.com>

[-- Attachment #1: Type: text/plain, Size: 830 bytes --]

On Mon, Oct 29, 2007 at 07:45:26AM +0000, Lars Knoll wrote:
> +static int no_wildcard(const char *string)
> +{
> +    return !strchr(string, '*') && !strchr(string, '?') 
> && !strchr(string, '[') && !strchr(string, '{');

       return string[strcspn(string, "*?[{")] == '\0';

is faster as it doesn't scan the string 4 time in the case where there
is no wildcard.

> +}
> +
>  void add_exclude(const char *string, const char *base,
>  		 int baselen, struct exclude_list *which)
>  {
>  	struct exclude *x = xmalloc(sizeof (*x));
>  
> +        x->to_exclude = 1;

  You used spaces in here, and in many places of your patch.


-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2007-10-29  8:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-29  7:45 [PATCH] Speedup scanning for excluded files Lars Knoll
2007-10-29  8:02 ` Pierre Habouzit [this message]
2007-10-29  8:59   ` Lars Knoll
2007-10-29 22:17     ` Junio C Hamano
2007-10-29 22:59     ` Morten Welinder
2007-10-30  0:00       ` Junio C Hamano
2007-10-30  7:28         ` Lars Knoll
2007-10-30  7:46           ` [PATCH v3] " Lars Knoll

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=20071029080234.GA22826@artemis.corp \
    --to=madcoder@debian.org \
    --cc=git@vger.kernel.org \
    --cc=lars@trolltech.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).