Re: [PATCH v3 02/38] sequencer: move "else" keyword onto the same line as preceding brace
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 12, 2017, 18:49 UTC
- Message-ID
- <xmqqbmvckta7.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <65e0dac0115713b6ae955acdbc5b7655aeb18e7c.1483370556.git.johannes.schindelin@gmx.de>
Johannes Schindelin <johannes.schindelin@gmx.de> writes:
Show 12 quoted lines
> It is the current coding style of the Git project to write
>
> if (...) {
> ...
> } else {
> ...
> }
>
> instead of putting the closing brace and the "else" keyword on separate
> lines.
>
> Pointed out by Junio Hamano.For a small thing like this, the attribution is mostly irrelevant, but for the record, the credit should go to checkpatch.pl from the kernel project ;-).
I'll try to squash the part that was touched by 01/38 into this patch locally; even though I haven't finished going through the individual patches, I expect that my conclusion would be what I said in <xmqqinpnuaxl.fsf@gitster.mtv.corp.google.com>, i.e. the changes in the series are mostly good and improved relative to the previous round except for the parts reading and writing of author-script (from the maintainability's point of view).
As I do not think we want to see another reroll of three-dozen patches, I am leaning towards merging v3 (with minimum fixes like squashing 01/ and 02/ into one) to 'next' and cook it there and fix remaining issues incrementally while the series is in 'next'.
I may have to change my mind after I read through the remaining patches (I've done with the first dozen or so at this moment), but I do not expect that, judging from what I saw in the interdiff.
Thanks.
Show 19 quoted lines
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
> sequencer.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/sequencer.c b/sequencer.c
> index 23793db08b..3eededcb98 100644
> --- a/sequencer.c
> +++ b/sequencer.c
> @@ -1070,8 +1070,7 @@ static int create_seq_dir(void)
> error(_("a cherry-pick or revert is already in progress"));
> advise(_("try \"git cherry-pick (--continue | --quit | --abort)\""));
> return -1;
> - }
> - else if (mkdir(git_path_seq_dir(), 0777) < 0)
> + } else if (mkdir(git_path_seq_dir(), 0777) < 0)
> return error_errno(_("could not create sequencer directory '%s'"),
> git_path_seq_dir());
> return 0;