git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Kiedrowicz <michal.kiedrowicz@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, J Smith <dark.panda@gmail.com>
Subject: Re: grep.patternType
Date: Thu, 4 Oct 2012 08:05:43 +0200	[thread overview]
Message-ID: <20121004080543.3b31280f@mkiedrowicz> (raw)
In-Reply-To: <7vmx032of1.fsf@alter.siamese.dyndns.org>

Junio C Hamano <gitster@pobox.com> wrote:

> Junio C Hamano <gitster@pobox.com> writes:
> 
> > Junio C Hamano <gitster@pobox.com> writes:
> >
> >>  * "git grep" learned to use a non-standard pattern type by
> >> default if a configuration variable tells it to.
> >
> > This addition makes
> >
> >     git grep -e "(integer|buffer)"
> >
> > work as expected, when grep.patternType is set to "extended".
> >
> > Should this
> >
> >     git log --grep="(integer|buffer)"
> >
> > also honor the same configuration variable?  If not, why not?

I think this should respect grep.patternType.

> >
> > One more thing.  Currently you can say
> >
> >     git log -E --grep="(integer|buffer)"
> >
> > to ask for the ERE.  Should we also support -P to ask for pcre?  If
> > not, why not?

This also.

> 
> Answering to myself who has been in tying-loose-ends mode.
> 
> My answers to these questions are both yes, and I have a neatly
> lined up series that begins with a small bugfix and then
> enhancement, but I do not think these do not deserve to in the
> upcoming release.  The topic came too late, and even the fix is
> for a bug that has been with us for a long time.

I think I am the one to blame for this inconsistency.  When I
implemented "git-grep -P" I was thinking about making it work for all
regex operations in git but since I'm mostly using regexes with
git-grep I was too lazy to make it work with git-log.

  reply	other threads:[~2012-10-04 21:56 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-01 22:44 [ANNOUNCE] Git v1.8.0-rc0 Junio C Hamano
2012-10-03 20:18 ` grep.patternType (was: Re: [ANNOUNCE] Git v1.8.0-rc0) Junio C Hamano
2012-10-03 22:14   ` grep.patternType Junio C Hamano
2012-10-04  6:05     ` Michal Kiedrowicz [this message]
2012-10-05  5:38     ` grep.patternType J Smith
2012-10-04  1:33   ` [PATCH 0/6] Tying loose ends of extended "grep" Junio C Hamano
2012-10-04  1:33     ` [PATCH 1/6] grep: move configuration support to top-level grep.[ch] Junio C Hamano
2012-10-04  1:33     ` [PATCH 2/6] grep: move pattern-type bits " Junio C Hamano
2012-10-04  1:33     ` [PATCH 3/6] log --grep: use the same helper to set -E/-F options as "git grep" Junio C Hamano
2012-10-04  8:09       ` Jeff King
2012-10-04  1:33     ` [PATCH 4/6] log --grep: accept --basic-regexp and --perl-regexp Junio C Hamano
2012-10-04  8:12       ` Jeff King
2012-10-04 16:44         ` Junio C Hamano
2012-10-04  1:33     ` [PATCH 5/6] log: pass rev_info to git_log_config() Junio C Hamano
2012-10-04  7:05       ` Junio C Hamano
2012-10-05  4:16         ` Junio C Hamano
2012-10-05 15:33           ` Jeff King
2012-10-05 19:07             ` Junio C Hamano
2012-10-04  1:33     ` [PATCH 6/6] log --grep: honor grep.patterntype etc. configuration variables Junio C Hamano
2012-10-04  8:17       ` Jeff King
2012-10-04 16:46         ` Junio C Hamano
2012-10-04 18:01           ` Jeff King
2012-10-04 19:09             ` Junio C Hamano

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=20121004080543.3b31280f@mkiedrowicz \
    --to=michal.kiedrowicz@gmail.com \
    --cc=dark.panda@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).