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

Re: [PATCH v2] git-p4: use raw string literals for regular expressions

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 29, 2024, 17:25 UTC
Message-ID
<xmqqle88jbkt.fsf@gitster.g>
In-Reply-To
<pull.1639.v2.git.1706312496608.gitgitgadget@gmail.com>
"James Touton via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 39 quoted lines
> From: James Touton <bekenn@gmail.com>
>
> Fixes several Python diagnostics about invalid escape sequences. The
> diagnostics appear for me in Python 3.12, and may appear in earlier
> versions. The fix is to use raw string literals so that backslashes are
> not interpreted as introducing escape sequences. Raw string literals
> are already in use in this file, so adding more does not impact
> toolchain compatibility.
>
> Signed-off-by: James Touton <bekenn@gmail.com>
> ---
>     git-p4: use raw string literals for regular expressions
>     
>     Changes since v1:
>     
>      * Updated commit message to include the Python version where the
>        diagnostics were observed.
>
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1639%2FBekenn%2Fp4-raw-strings-v2
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1639/Bekenn/p4-raw-strings-v2
> Pull-Request: https://github.com/gitgitgadget/git/pull/1639
>
> Range-diff vs v1:
>
>  1:  1ea38dc4643 ! 1:  122ff28ffbd git-p4: use raw string literals for regular expressions
>      @@ Metadata
>        ## Commit message ##
>           git-p4: use raw string literals for regular expressions
>       
>      -    Fixes several Python diagnostics about invalid escape sequences.
>      +    Fixes several Python diagnostics about invalid escape sequences. The
>      +    diagnostics appear for me in Python 3.12, and may appear in earlier
>      +    versions. The fix is to use raw string literals so that backslashes are
>      +    not interpreted as introducing escape sequences. Raw string literals
>      +    are already in use in this file, so adding more does not impact
>      +    toolchain compatibility.
>       
>           Signed-off-by: James Touton <bekenn@gmail.com>
>       
Thanks.  Let's merge it down to 'next'.
Previous: James Touton via GitGitGadget
Message 6 of 6 in “git-p4: use raw string literals for regular expressions”
  1. git-p4: use raw string literals for regular expressionsJames Touton via GitGitGadget, Jan 20, 2024
  2. Junio C HamanoJan 20, 2024
  3. James ToutonJan 20, 2024
  4. Junio C HamanoJan 20, 2024
  5. git-p4: use raw string literals for regular expressionsJames Touton via GitGitGadget, Jan 26, 2024
  6. Junio C HamanoJan 29, 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.