From: "Giuseppe Bilotta" <giuseppe.bilotta@gmail.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] diff: add ruby funcname pattern
Date: Fri, 1 Aug 2008 10:11:16 +0200 [thread overview]
Message-ID: <cb7bb73a0808010111j29e2085etd58150037b55063c@mail.gmail.com> (raw)
In-Reply-To: <7vmyjxtco3.fsf@gitster.siamese.dyndns.org>
On Fri, Aug 1, 2008 at 9:30 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Thanks.
>
> I do not talk Ruby,
You're really missing into something ;)
> so I'll wait for a few days to hear any one of the
> following happen before deciding what to do with this patch:
>
> (1) Yeah, this is a sufficient and necessary set of keywords, and it
> would make my Ruby life so much better;
>
> (2) This might be a good start but you need to cover this and that
> keywords as well;
>
> (3) This will misidentify a line that is not the beginning of a
> definition, and should not be applied;
>
> Needless to say, "Here is a better patch" is appreciated if somebody says
> (2) or (3).
I wasn't sure about the completeness of the regexp myself, which is
why I asked in #ruby on freenode for additional suggestions. The only
reply I got was an idea to add a number of block-based coding sections
such as Procs an Threads by matching .*\.new ({|do) as well.
This is something I had been thinking about myself, but I decided to
discard the idea because the current chunk text detection in git does
not have a way to say 'this is the end of a function, so get back to
the previous chunk (con)text' instead of using the last chunk text: so
if I have methodx followed by methody and make a change near the top
of methody I get methodx in the chunk text.
This limitation, that affects all funcname parsers, has kept me from
adding Proc, Thread and other anonymous code blocks to the Ruby
funcname, because having the proper context for changed code after an
anonymous block is IMO better than having specific context in the
anonymous block itself.
OTOH, if the funcname capability was expand to a full stack
manipulation (push chunk text, pop chunk text) ... (and yes, if I ever
find a sane way to do it myself I *will* provide a patch)
--
Giuseppe "Oblomov" Bilotta
next prev parent reply other threads:[~2008-08-01 8:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-31 7:21 [PATCH] diff: add ruby funcname pattern Giuseppe Bilotta
2008-08-01 7:30 ` Junio C Hamano
2008-08-01 8:11 ` Giuseppe Bilotta [this message]
2008-08-01 8:20 ` Junio C Hamano
2008-08-01 8:39 ` Giuseppe Bilotta
2008-08-01 14:41 ` Jeff King
2008-08-02 0:31 ` Kevin Ballard
2008-08-02 3:50 ` Junio C Hamano
2008-08-02 5:41 ` Giuseppe Bilotta
2008-08-02 5:47 ` Kevin Ballard
2008-08-02 6:06 ` Giuseppe Bilotta
2008-08-02 11:39 ` Johannes Schindelin
2008-08-02 11:50 ` Giuseppe Bilotta
2008-08-02 15:37 ` Lee Marlow
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cb7bb73a0808010111j29e2085etd58150037b55063c@mail.gmail.com \
--to=giuseppe.bilotta@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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.
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 NNTP newsgroup(s).