git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-prompt.sh incompatible with non-basic global grep.patternType

From
Jeff King <peff@peff.net>
Date
Jul 20, 2016, 20:52 UTC
Message-ID
<20160720205207.GA578@sigill.intra.peff.net>
In-Reply-To
<xmqqwpkgcbp9.fsf@gitster.mtv.corp.google.com>
On Wed, Jul 20, 2016 at 01:10:42PM -0700, Junio C Hamano wrote:
Show 15 quoted lines
> This may fix it.  I think the root cause is that logic to smear
> "pattern type" into various broken-down fields in grep_opt for the
> short-hands like --basic-regexp option needs to leave "I am setting
> this short-hand" mark to allow the grep_commit_pattern_type() that
> is done as the final step of the set-up sequence before we call
> compile_grep_patterns() can take notice.  The calls currently made
> to grep_set_pattern_type_option() when we parse "--basic-regexp" and
> friends forgets to override the "source of truth" field and only
> updates the broken-down fields.
> 
> An alternative may be to update places that parse "--basic-regexp"
> and friends to just write to .pattern_type_option without calling
> grep_set_pattern_type_option(); that might be a cleaner, but I am
> not feeling well today so I won't be able to do a deeper analysis
> right now.

I gave a very cursory look when I wrote the other email, and your alternative solution is what looked like the most elegant fix to me.

I suspect this bug has been there quite a while, so no rush. :)
-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 14 in “git-prompt.sh incompatible with non-basic global grep.patternType”
  1. Richard SoderbergJul 18, 2016
  2. Johannes SchindelinJul 19, 2016
  3. Richard SoderbergJul 19, 2016
  4. Johannes SchindelinJul 19, 2016
  5. Jeff KingJul 20, 2016
  6. Junio C HamanoJul 20, 2016
  7. Jeff KingJul 20, 2016
  8. Junio C HamanoJul 22, 2016
  9. Jeff KingJul 22, 2016
  10. Junio C HamanoJul 22, 2016
  11. Jeff KingJul 22, 2016
  12. Junio C HamanoJul 22, 2016
  13. Eric SunshineJul 22, 2016
  14. Junio C HamanoJul 25, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.