git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: Jeff King <peff@peff.net>, git@vger.kernel.org
Subject: Re: [RFC/PATCH 0/3] git log --pretty=lua
Date: Tue, 25 Sep 2012 09:40:39 -0700	[thread overview]
Message-ID: <7vhaqmvywo.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <vpqvcf2ruyv.fsf@grenoble-inp.fr> (Matthieu Moy's message of "Tue, 25 Sep 2012 17:19:20 +0200")

Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:

> Jeff King <peff@peff.net> writes:
>
>> We've talked off and on about extending the --pretty=format specifiers
>> to something more flexible. There's also been talk recently of more
>> flexible commit-filtering (e.g., grepping individual notes).
>
> Mercurial has a similar thing, which can be a source of inspiration:
>
> http://www.selenic.com/hg/help/revsets
>
> On the one hand, if find it a bit overkill to have a full language for
> this, but on the other hand, it allows expressing easily and explicitely
> boolean operators.
>
> I would find
>
>   git log 'grep(foo) or grep(bar)'
>
> very intuitive and elegant,...

You have to be careful with "grep", though.  It would be unclear
what "and" there would mean if you replaced your "or" with.

Peff's earlier examples e.g.

  git log --lua-filter='
    return
      author().name.match("Junio") &&
      note("p4").match("1234567")
  '

  git log --lua-filter='return subject().len > 100'

are clearly good ones that illustrate the power of filtering.

  reply	other threads:[~2012-09-25 16:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-25  0:23 [RFC/PATCH 0/3] git log --pretty=lua Jeff King
2012-09-25  0:24 ` [PATCH 1/3] pretty: make some commit-parsing helpers more public Jeff King
2012-09-25  0:25 ` [PATCH 2/3] add basic lua infrastructure Jeff King
2012-09-25  1:55   ` Nguyen Thai Ngoc Duy
2012-09-25  4:53     ` Jeff King
2012-09-25  3:21   ` Robin H. Johnson
2012-09-25  3:42     ` Jeff King
2012-09-25 21:18       ` Junio C Hamano
2012-09-25  0:25 ` [PATCH 3/3] add a "lua" pretty format Jeff King
2012-10-06 17:33   ` Jeff King
2012-09-25 11:22 ` [RFC/PATCH 0/3] git log --pretty=lua Nguyen Thai Ngoc Duy
2012-09-25 13:49   ` Stephen Bash
2012-09-25 15:19 ` Matthieu Moy
2012-09-25 16:40   ` Junio C Hamano [this message]
2012-09-30  4:31 ` Nguyen Thai Ngoc Duy

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=7vhaqmvywo.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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).