git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jeff King <peff@peff.net>,
	Richard Soderberg <rsoderberg@gmail.com>,
	Git List <git@vger.kernel.org>
Subject: Re: git-prompt.sh incompatible with non-basic global grep.patternType
Date: Fri, 22 Jul 2016 19:28:22 -0400	[thread overview]
Message-ID: <CAPig+cSw2t36n3ir61BhcMbSVMYoTVrYwbyGVSPcLoGnwR4w2w@mail.gmail.com> (raw)
In-Reply-To: <xmqqr3ala37o.fsf@gitster.mtv.corp.google.com>

On Fri, Jul 22, 2016 at 3:21 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Subject: [PATCH] grep: further simplify setting the pattern type
>
> When c5c31d33 (grep: move pattern-type bits support to top-level
> grep.[ch], 2012-10-03) introduced grep_commit_pattern_type() helper
> function, the intention was to allow the users of grep API to having
> to fiddle only with .pattern_type_option (which can be set to "fixed",
> "basic", "extended", and "pcre"), and then immediately before compiling
> the pattern strings for use, call grep_commit_pattern_type() to have
> it prepare various bits in the grep_opt structure (like .fixed,
> .regflags, etc.).
>
> However, grep_set_pattern_type_option() helper function the grep API
> internally uses were left as an external function by mistake.  This
> function shouldn't have been made callable by the users of the API.
>
> Later when the grep API was used in revision graversal machinery,

s/graversal/traversal/

> the caller then mistakenly started calling the function around
> 34a4ae55 (log --grep: use the same helper to set -E/-F options as
> "git grep", 2012-10-03), instead of setting the .pattern_type_option
> field and letting the grep_commit_pattern_type() to take care of the
> details.
>
> This caused an unnecessary bug that made a configured
> grep.patternType take precedence over the command line options
> (e.g. --basic-regexp, --fixed-strings) in "git log" family of
> commands.
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>

  parent reply	other threads:[~2016-07-22 23:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-18 22:56 git-prompt.sh incompatible with non-basic global grep.patternType Richard Soderberg
2016-07-19 11:24 ` Johannes Schindelin
2016-07-19 14:14   ` Richard Soderberg
2016-07-19 14:35     ` Johannes Schindelin
2016-07-20 13:42 ` Jeff King
2016-07-20 20:10   ` Junio C Hamano
2016-07-20 20:52     ` Jeff King
2016-07-22 19:21       ` Junio C Hamano
2016-07-22 19:28         ` Jeff King
2016-07-22 19:51           ` Junio C Hamano
2016-07-22 20:05             ` Jeff King
2016-07-22 20:33               ` Junio C Hamano
2016-07-22 23:28         ` Eric Sunshine [this message]
2016-07-25 16:16           ` 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=CAPig+cSw2t36n3ir61BhcMbSVMYoTVrYwbyGVSPcLoGnwR4w2w@mail.gmail.com \
    --to=sunshine@sunshineco.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=rsoderberg@gmail.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).