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

Re: gitweb: using quotemeta

From
Junio C Hamano <junkio@cox.net>
Date
Sep 28, 2006, 23:18 UTC
Message-ID
<7vodszshq3.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060928211600.97412.qmail@web31808.mail.mud.yahoo.com>
Luben Tuikov <ltuikov@yahoo.com> writes:
Show 14 quoted lines
> Commit ab41dfbfd4f3f9fedac71550027e9813b11abe3d introduces
> the use of quotemeta to quote the $filename of the snapshot.
> The commit message explains:
>
>     Just in case filename contains end of line character.
>
> But quotemeta quotes any characters not matching /A-Za-z_0-9/.
> Which means that we get strings like this:
>     
>     linux\-2\.6\.git\-5c2d97cb31fb77981797fec46230ca005b865799\.tar\.gz
>
> Is this the desired behavior?  FWIW, the backslash character
> is not part of of the name, but ended up when the snapshot was written
> to the filesystem.

Ouch, that was a sloppy planning and coding, and sloppier reviewing. Sorry.

What is the right quoting there?  Just quoting double-quotes?
Previous: Luben TuikovNext: Luben Tuikov
Message 2 of 14 in “gitweb: using quotemeta”
  1. Luben TuikovSep 28, 2006
  2. Junio C HamanoSep 28, 2006
  3. Luben TuikovSep 28, 2006
  4. Jakub NarebskiOct 2, 2006
  5. Luben TuikovOct 2, 2006
  6. Jakub NarebskiOct 2, 2006
  7. Junio C HamanoOct 3, 2006
  8. Jakub NarebskiOct 6, 2006
  9. Junio C HamanoOct 7, 2006
  10. Jakub NarebskiOct 7, 2006
  11. Luben TuikovOct 7, 2006
  12. Jakub NarebskiOct 11, 2006
  13. Petr BaudisOct 6, 2006
  14. Luben TuikovOct 6, 2006

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.