Re: [PATCH 5/5] builtin/commit.c: reduce scope of variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 29, 2014 at 8:48 AM, Elia Pinto <gitter.spiros@xxxxxxxxx> wrote:
> diff --git a/builtin/commit.c b/builtin/commit.c
> index 3767478..eea4421 100644
> --- a/builtin/commit.c
> +++ b/builtin/commit.c
> @@ -1510,7 +1511,6 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
>         struct ref_lock *ref_lock;
>         struct commit_list *parents = NULL, **pptr = &parents;
>         struct stat statbuf;
> -       int allow_fast_forward = 1;
>         struct commit *current_head = NULL;
>         struct commit_extra_header *extra = NULL;
>
> @@ -1576,6 +1576,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
>                 }
>                 fclose(fp);
>                 strbuf_release(&m);
> +               int allow_fast_forward = 1;

This introduces a declaration-after-statement, which is frowned upon
in this project.

>                 if (!stat(git_path("MERGE_MODE"), &statbuf)) {
>                         if (strbuf_read_file(&sb, git_path("MERGE_MODE"), 0) < 0)
>                                 die_errno(_("could not read MERGE_MODE"));
> --
> 1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]