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

Re: [PATCH 1/2] rebase -i: match whole word in is_command()

From
Jeff King <peff@peff.net>
Date
Feb 26, 2023, 10:29 UTC
Message-ID
<Y/s0iV5cS9fJ2ONl@coredump.intra.peff.net>
In-Reply-To
<b050e7c1a4daf6c65aa9b2b6f44248d7b403918e.1677185702.git.gitgitgadget@gmail.com>
On Thu, Feb 23, 2023 at 08:55:00PM +0000, Phillip Wood via GitGitGadget wrote:
Show 6 quoted lines
> Fix this by ensuring the match is follow by whitespace or the end of the
> string as we already do for abbreviated commands. The (*bol = p) at the
> end of the condition is a bit cute for my taste but I decided to leave
> it be for now. Rather than add new tests the existing tests for bad
> commands are adapted to use a bad command name that triggers the prefix
> matching bug.

FWIW, coverity complained about the (*bol = p) assignment in the conditional, since "p" must be non-NULL at this point.

So this is email is a combination of:
  - a data point that it is not just you that finds it a bit cute (in
    case you do want to change it later); and
  - a hearty thank you for mentioning it in the commit message, since
    just looking at the code left me scratching my head at whether this
    was a bug.
-Peff
Previous: Junio C HamanoNext: Phillip Wood via GitGitGadget
Message 4 of 8 in “sequencer parsing fixes”
  1. 0/2 sequencer parsing fixesPhillip Wood via GitGitGadget, Feb 23, 2023
  2. 1/2 rebase -i: match whole word in is_command()Phillip Wood via GitGitGadget, Feb 23, 2023
  3. Junio C HamanoFeb 23, 2023
  4. Jeff KingFeb 26, 2023
  5. 2/2 rebase -i: fix parsing of "fixup -C<commit>"Phillip Wood via GitGitGadget, Feb 23, 2023
  6. Junio C HamanoFeb 23, 2023
  7. Johannes SchindelinFeb 24, 2023
  8. Junio C HamanoFeb 24, 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.