Re: [PATCH] Speed up commands that use rev-list when max-count is specified.
- From
Mark Lodato <lodatom@gmail.com>
- Date
- Mar 21, 2010, 14:09 UTC
- Message-ID
- <ca433831003210709k1da46c8docfdac358253625e@mail.gmail.com>
- 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:
Show 7 quoted lines
> 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.