From: Eric Sunshine Date: Wed, 29 Jan 2014 20:17:07 GMT Subject: Re: [PATCH 5/5] builtin/commit.c: reduce scope of variables Message-ID: In-Reply-To: <1391003311-11126-1-git-send-email-gitter.spiros@gmail.com> On Wed, Jan 29, 2014 at 8:48 AM, Elia Pinto 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