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

[PATCH 0/2] some minor starts_with()/skip_prefix() cleanups

From
Jeff King <peff@peff.net>
Date
Jan 7, 2023, 13:24 UTC
Message-ID
<Y7lyga5g2leSmWQd@coredump.intra.peff.net>

I happened to notice a recently-introduced strncmp() that could have been a starts_with(). So I grepped and found a few more, and this is the result.

  [1/2]: convert trivial uses of strncmp() to starts_with()
  [2/2]: convert trivial uses of strncmp() to skip_prefix()
 builtin/remote-ext.c | 6 ++++--
 builtin/remote-fd.c  | 2 +-
 bundle-uri.c         | 2 +-
 ref-filter.c         | 2 +-
 urlmatch.c           | 6 +++---
 ws.c                 | 7 ++++---
 6 files changed, 14 insertions(+), 11 deletions(-)
-Peff
Next: Jeff King
Message 1 of 6 in “some minor starts_with()/skip_prefix() cleanups”
  1. 0/2 some minor starts_with()/skip_prefix() cleanupsJeff King, Jan 7, 2023
  2. 1/2 convert trivial uses of strncmp() to starts_with()Jeff King, Jan 7, 2023
  3. 2/2 convert trivial uses of strncmp() to skip_prefix()Jeff King, Jan 7, 2023
  4. Jeff KingJan 7, 2023
  5. René ScharfeJan 7, 2023
  6. Jeff KingJan 11, 2023

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.