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

Re: [PATCH] t6300: values containing ')' are broken in ref formats

From
Kousik Sanagavarapu <five231003@gmail.com>
Date
Nov 7, 2024, 02:34 UTC
Message-ID
<ZywnS4j7gxn53N+G@five231003>
In-Reply-To
<20241106185511.GB880133@coredump.intra.peff.net>
On Wed, Nov 06, 2024 at 01:55:11PM -0500, Jeff King wrote:
Show 12 quoted lines
> On Wed, Nov 06, 2024 at 09:24:08AM +0530, Kousik Sanagavarapu wrote:
> 
> > One way to fix this is refactoring the way in which we parse our format
> > string.  Although this would mean we would have to do a huge refactoring
> > as this step happens very high up in the call chain.
> > 
> > Therefore, support including parenthesis characters in "<string>" by
> > instead giving their hexcode equivalents - as a for-now hack.
> 
> So if I understand this is just expanding %<hex> and nothing else? That
> seems like the worst of both worlds. Now "%" is magic in these value
> strings, breaking compatibility, but

Yeah, I agree that this might be the worst of both worlds after I read your reply to Junio. It indeed is a hack - just trying to fix the parenthesis case and not taking into account

- backwards compatibility with regards to '%'.
- not being able to do
> we didn't buy ourselves the flexibility to do arbitrary comparisons like:
> 
>   %(if:equals=%(upstream:lstrip=3))%(refname:short)%(then)...
Previous: Jeff KingNext: Jeff King
Message 7 of 14 in “t6300: values containing ')' are broken in ref formats”
  1. t6300: values containing ')' are broken in ref formatsKousik Sanagavarapu, Nov 5, 2024
  2. Junio C HamanoNov 6, 2024
  3. Jeff KingNov 6, 2024
  4. Junio C HamanoNov 6, 2024
  5. Kousik SanagavarapuNov 6, 2024
  6. Jeff KingNov 6, 2024
  7. Kousik SanagavarapuNov 7, 2024
  8. Jeff KingNov 6, 2024
  9. Kousik SanagavarapuNov 7, 2024
  10. Junio C HamanoNov 7, 2024
  11. Kousik SanagavarapuNov 8, 2024
  12. Jeff KingNov 8, 2024
  13. Kousik SanagavarapuNov 8, 2024
  14. Kousik SanagavarapuNov 6, 2024

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.