git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Lodato <lodatom@gmail.com>
To: Benjamin C Meyer <bmeyer@rim.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Speed up commands that use rev-list when max-count is  specified.
Date: Sun, 21 Mar 2010 10:09:20 -0400	[thread overview]
Message-ID: <ca433831003210709k1da46c8docfdac358253625e@mail.gmail.com> (raw)
In-Reply-To: <1269142267-17127-1-git-send-email-bmeyer@rim.com>

On Sat, Mar 20, 2010 at 11:31 PM, Benjamin C Meyer <bmeyer@rim.com> wrote:
>  struct commit *get_revision(struct rev_info *revs)
>  {
> +       if (revs->max_count == 0)
> +               return NULL;
> +
>        struct commit *c;
>        struct commit_list *reversed;

Declaring variables in the middle of a function is a C99 feature (and
a GNU extension in C89 mode).  I don't know if this is allowed in git
code, but it would be easy enough to make this ANSI C89 compatible by
putting your new statement after the variable declarations.

      parent reply	other threads:[~2010-03-21 14:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-21  3:31 [PATCH] Speed up commands that use rev-list when max-count is specified Benjamin C Meyer
2010-03-21 11:12 ` Sverre Rabbelier
2010-03-21 16:57   ` Benjamin Meyer
2010-03-21 14:09 ` Mark Lodato [this message]

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=ca433831003210709k1da46c8docfdac358253625e@mail.gmail.com \
    --to=lodatom@gmail.com \
    --cc=bmeyer@rim.com \
    --cc=git@vger.kernel.org \
    /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).