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

Re: [PATCH] userdiff: support Python async functions

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 11, 2019, 02:28 UTC
Message-ID
<xmqqpnhzi1so.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20191111010148.2812-1-anowlcalledjosh@gmail.com>
Josh Holland <anowlcalledjosh@gmail.com> writes:
Show 14 quoted lines
> Python's async functions (declared with "async def" rather than "def")
> were not being displayed in hunk headers. This commit teaches git about
> the async function syntax, and adds tests for the Python userdiff regex.
>
> Signed-off-by: Josh Holland <anowlcalledjosh@gmail.com>
> ---
>  t/t4018/python-async-def | 4 ++++
>  t/t4018/python-class     | 4 ++++
>  t/t4018/python-def       | 4 ++++
>  userdiff.c               | 2 +-
>  4 files changed, 13 insertions(+), 1 deletion(-)
>  create mode 100644 t/t4018/python-async-def
>  create mode 100644 t/t4018/python-class
>  create mode 100644 t/t4018/python-def

It seems that there were no test patterns for Python ;-) The change to userdiff.c part (i.e. "where we used to expect 'def', we now allow it to be prefixed with an optional 'async' plus whitespace") makes sense.

Thanks, will queue.
Previous: Josh HollandNext: Johannes Sixt
Message 2 of 4 in “userdiff: support Python async functions”
  1. userdiff: support Python async functionsJosh Holland, Nov 11, 2019
  2. Junio C HamanoNov 11, 2019
  3. Johannes SixtNov 11, 2019
  4. Junio C HamanoNov 12, 2019

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.