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

Re: [PATCH] git-remote-mediawiki: Fix a bug in a regexp

From
Célestin Matte <celestin.matte@ensimag.fr>
Date
Jun 8, 2013, 20:08 UTC
Message-ID
<51B38F44.6080304@ensimag.fr>
In-Reply-To
<vpqmwr0v45b.fsf@anie.imag.fr>

Le 08/06/2013 20:38, Matthieu Moy a écrit :> This is right, but the code actually worked the way it was. I'm not

Show 5 quoted lines
> sure, but my understanding is that '\n' is the string "backslash
> followed by n", but interpreted as a regexp, it is a newline.
>
> The new code looks better than the old one, but the log message may be
> improved.
Is this better?

" In Perl, '\n' is not a newline, but instead the string composed of a backslash followed by an "n". To match newlines, one has to use the /\n/ regexp. As the output of "rev-list --first-parent" is line-oriented, what we want here is to match newlines, and not the "\n" string. "

-- 
Célestin Matte
Previous: Matthieu MoyNext: Jeff King
Message 3 of 6 in “git-remote-mediawiki: Fix a bug in a regexp”
  1. git-remote-mediawiki: Fix a bug in a regexpCélestin Matte, Jun 8, 2013
  2. Matthieu MoyJun 8, 2013
  3. Célestin MatteJun 8, 2013
  4. Jeff KingJun 9, 2013
  5. Eric SunshineJun 9, 2013
  6. Eric SunshineJun 9, 2013

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.