From: Julia Lawall <julia.lawall@lip6.fr>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Git Mailing List" <git@vger.kernel.org>
Subject: Re: git log -S or -G
Date: Sun, 7 Oct 2018 07:21:26 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.21.1810070719200.2347@hadrien> (raw)
In-Reply-To: <xmqqd0smvay0.fsf@gitster-ct.c.googlers.com>
[-- Attachment #1: Type: text/plain, Size: 1499 bytes --]
On Sun, 7 Oct 2018, Junio C Hamano wrote:
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>
> > On Sat, Oct 6, 2018 at 5:16 PM Julia Lawall <julia.lawall@lip6.fr> wrote:
> >> Git log -S or -G make it possible to find commits that have particular
> >> words in the changed lines. Sometimes it would be helpful to search for
> >> words in the removed lines or in the added lines specifically. From the
> >> implementation, I had the impression that this would be easy to implement.
> >> The main question would be how to allow the user to specify what is
> >> wanted.
> >
> > As far as I know this isn't possible. The --diff-filter option is
> > similar in spirit, but e.g. adding "foo" and then removing it from an
> > existing file will both be covered under --diff-filter=M, so that
> > isn't what you're looking for.
>
> I agree with Julia that UI to the feature is harder than the
> machinery to implement the feature to add "I am interested in seeing
> a patch that contains a hunk that adds 'foo' but am not interested
> in removal" (or vice versa) for -G. You tweak
> diffcore-pickaxe.c::diffgrep_consume() and you'are done.
>
> Doing the same for -S is much harder at the machinery level, as it
> performs its thing without internally running "diff" twice, but just
> counts the number of occurrences of 'foo'---that is sufficient for
> its intended use, and more efficient.
There is still the question of whether the number of occurrences of foo
decreases or increases.
julia
next prev parent reply other threads:[~2018-10-07 5:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-06 15:14 git log -S or -G Julia Lawall
2018-10-06 16:22 ` Ævar Arnfjörð Bjarmason
2018-10-07 0:48 ` Junio C Hamano
2018-10-07 5:21 ` Julia Lawall [this message]
2018-10-08 23:09 ` Junio C Hamano
2018-10-09 3:21 ` Jeff King
2018-10-09 3:58 ` Jacob Keller
2018-10-09 6:39 ` Julia Lawall
2018-10-09 5:21 ` Junio C Hamano
2018-10-09 12:45 ` Ævar Arnfjörð Bjarmason
2018-10-09 13:51 ` Julia Lawall
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=alpine.DEB.2.21.1810070719200.2347@hadrien \
--to=julia.lawall@lip6.fr \
--cc=avarab@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.
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).