From: Bert Wesarg <bert.wesarg@googlemail.com>
To: git@vger.kernel.org
Cc: Bert Wesarg <bert.wesarg@googlemail.com>
Subject: [PATCH/RFC 0/4] grep: support to match by line number
Date: Mon, 2 May 2011 13:39:09 +0200 [thread overview]
Message-ID: <cover.1304318972.git.bert.wesarg@googlemail.com> (raw)
This series will teach git grep to match at specified line numbers. This is
particular usefull, if you want to see the lines which emits warnings or errors
from a build run (where you only get the line number) and present it nicely to
the user with function and context lines.
The implementation is split-up into preperation patches which are only noise:
Bert Wesarg (4):
grep: prepare for re-using the space of the regexp member in struct
grep_pat
This one moves the regexp member into an union, so that we can later re-use
the space for the line number information.
grep: pass current line number down to match_one_pattern
To actually match at the line number, the function match_one_pattern needs
to know the current line number, do it with this patch.
grep: introduce pattern which matches at line number
This implements the line number matching in the low level grep machinery.
grep: provide option to match line number
And lastly, this exposes the new feature by a new -@ option to git grep.
Patch 5 will than support comma separated line ranges as argument to -@, but
this work has not yet started.
Documentation/git-grep.txt | 6 +++-
builtin/grep.c | 10 +++++
grep.c | 87 ++++++++++++++++++++++++++++++--------------
grep.h | 11 ++++--
4 files changed, 83 insertions(+), 31 deletions(-)
--
1.7.5.349.gfeb1a
next reply other threads:[~2011-05-02 11:39 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-02 11:39 Bert Wesarg [this message]
[not found] ` <cover.1304321122.git.bert.wesarg@googlemail.com>
2011-05-02 11:39 ` [PATCH/RFC 1/4] grep: prepare for re-using the space of the regexp member in struct grep_pat Bert Wesarg
2011-05-02 13:27 ` Thiago Farina
2011-05-02 14:25 ` Bert Wesarg
2011-05-02 11:39 ` [PATCH/RFC 2/4] grep: pass current line number down to match_one_pattern Bert Wesarg
2011-05-02 13:30 ` Thiago Farina
2011-05-02 14:29 ` Bert Wesarg
2011-05-02 16:40 ` Junio C Hamano
2011-05-02 11:39 ` [PATCH/RFC 3/4] grep: introduce pattern which matches at line number Bert Wesarg
2011-05-02 13:33 ` Thiago Farina
2011-05-02 14:32 ` Bert Wesarg
2011-05-02 11:39 ` [PATCH/RFC 4/4] grep: provide option to match " Bert Wesarg
2011-05-02 11:54 ` [PATCH/RFC 0/4] grep: support to match by " Sverre Rabbelier
2011-05-02 12:20 ` Bert Wesarg
2011-05-02 16:46 ` Junio C Hamano
2011-05-02 19:14 ` Bert Wesarg
2011-05-02 19:30 ` Junio C Hamano
2011-05-02 16:38 ` Junio C Hamano
2011-05-02 17:11 ` Jakub Narebski
2011-05-02 18:54 ` Bert Wesarg
2011-05-02 19:08 ` Junio C Hamano
2011-05-02 19:33 ` Bert Wesarg
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=cover.1304318972.git.bert.wesarg@googlemail.com \
--to=bert.wesarg@googlemail.com \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.