Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [RFC/PATCH 0/3] git log --pretty=lua

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:54:52

Jeff King [off-list ref] 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, while I never know whether

  git log --grep=foo --grep=bar

is a OR or a AND (there was a patch recently to clarify the doc).

Note that Mercurial's version seem to really act on sets of commits, not
just individual commits, as it allows things like

  hg log -r 'sort(date("May 2008"), user)'

or the equivalent of git's negative revision argument :

  "x - y"
      Changesets in x but not in y.

So it would be more a new "git log --filter='some expression'", not a
--pretty=lua.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help