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

Re: [PATCH 2/2] ref-filter: add function to parse atoms from a nul-terminated string

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Dec 8, 2016, 18:58 UTC
Message-ID
<CAM0VKjk1mnNzQX6LThq1t7keesBz_fjE9x2e0ywsBKSNKP9SCw@mail.gmail.com>
In-Reply-To
<20161207160923.7028-3-szeder.dev@gmail.com>
On Wed, Dec 7, 2016 at 5:09 PM, SZEDER Gábor <szeder.dev@gmail.com> wrote:
Show 10 quoted lines
> ref-filter's parse_ref_filter_atom() function parses an atom between
> the start and end pointers it gets as arguments.  This is fine for two
> of its callers, which process '%(atom)' format specifiers and the end
> pointer comes directly from strchr() looking for the closing ')'.
> However, it's not quite so straightforward for its other two callers,
> which process sort specifiers given as plain nul-terminated strings.
> Especially not for ref_default_sorting(), which has the default
> hard-coded as a string literal, but can't use it directly, because a
> pointer to the end of that string literal is needed as well.
> The next patch will add yet another caller using a string literal.
Oops, that last sentence should be deleted, there is no third patch, sorry.
Gábor
Previous: SZEDER GáborNext: SZEDER Gábor
Message 3 of 6 in “A bit of ref-filter atom parsing cleanups”
  1. 0/2 A bit of ref-filter atom parsing cleanupsSZEDER Gábor, Dec 7, 2016
  2. 2/2 ref-filter: add function to parse atoms from a nul-terminated stringSZEDER Gábor, Dec 7, 2016
  3. SZEDER GáborDec 8, 2016
  4. SZEDER GáborJan 26, 2017
  5. Junio C HamanoJan 26, 2017
  6. 1/2 ref-filter, tag: eliminate duplicated sorting option parsingSZEDER Gábor, Dec 7, 2016

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.