git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Alban Gruin <alban.gruin@gmail.com>, Git List <git@vger.kernel.org>
Subject: Re: [GSoC][PATCH] userdiff: add built-in pattern for golang
Date: Wed, 28 Feb 2018 14:32:27 -0800	[thread overview]
Message-ID: <xmqqvaegiw3o.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <CAPig+cQ3MuFhMHKGyejE2o0WnVZGvLwcLVgVLpshU_j01MkcaA@mail.gmail.com> (Eric Sunshine's message of "Wed, 28 Feb 2018 17:22:27 -0500")

Eric Sunshine <sunshine@sunshineco.com> writes:

> On Wed, Feb 28, 2018 at 5:17 PM, Alban Gruin <alban.gruin@gmail.com> wrote:
>> Yes, but I can split the line like that:
>>
>>     % cat >baz.go<<\EOF
>>     package baz
>>     func baz(arg1 int64,
>>         arg2 int64) {
>>     }
>>     EOF
>>     % go build baz.go
>>
>> This complies to the standard formatting (at least, gofmt doesn't change
>> it), but making the regex strict about the brace would cause it to
>> ignore those funcs, although I don't know how common they are.
>
> Makes sense. Thanks for the clarifying example. I wouldn't be at all
> surprised it such formatting exists in the wild, so keeping the regex
> as-is seems a good idea.

Does input like that appear in the tests the patch adds?  If not, it
probably is a good idea to have it somewhere in the commit (even if
there is no test addition, having it in the log message to explain
why the regex is done like so would be a good idea).

Thanks.

  reply	other threads:[~2018-02-28 22:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28 17:29 [GSoC][PATCH] userdiff: add built-in pattern for golang Alban Gruin
2018-02-28 18:47 ` Eric Sunshine
2018-02-28 21:31   ` Alban Gruin
2018-02-28 22:00     ` Eric Sunshine
2018-02-28 22:17       ` Alban Gruin
2018-02-28 22:22         ` Eric Sunshine
2018-02-28 22:32           ` Junio C Hamano [this message]
2018-02-28 22:43             ` Alban Gruin
2018-03-01 11:19 ` [GSoC][PATCH v2] " Alban Gruin
2018-03-01 18:24   ` Eric Sunshine

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqvaegiw3o.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=alban.gruin@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sunshine@sunshineco.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).