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

Re: [PATCH] add -p: introduce 'w' command to view hunk with --word-diff

From
Junio C Hamano <gitster@pobox.com>
Date
May 12, 2026, 00:04 UTC
Message-ID
<xmqqo6ilqyrp.fsf@gitster.g>
In-Reply-To
<CALnO6CCR9bQ71LR_buEAzX4UcR4sERnaVLc6_19sJUfXyi-HPA@mail.gmail.com>
"D. Ben Knoble" <ben.knoble@gmail.com> writes:
Show 8 quoted lines
>> >      :show <opts>
> ...
> - ":" is an exception to single-key mode and always allows more text
> to compose a longer-form "command". The first command could be "print"
> which takes options of this kind.
>
> Since ":" would be new, exempting it from single-key mode shouldn't be
> too jarring I guess.

OK. And we can use ':blah' to rarely used actions and give them descriptive names. Makes sense. word-diff sounds like a good candidate but it is not immediately obvious to me if machinery to set up the "colon is special and handles longhand commands with possible arguments" is worth doing.

Previous: D. Ben Knoble
Message 9 of 9 in “add -p: introduce 'w' command to view hunk with --word-diff”
  1. add -p: introduce 'w' command to view hunk with --word-diffJavier Bassi, May 6, 2026
  2. PabloMay 7, 2026
  3. Phillip WoodMay 7, 2026
  4. PabloMay 7, 2026
  5. Phillip WoodMay 7, 2026
  6. D. Ben KnobleMay 7, 2026
  7. Junio C HamanoMay 11, 2026
  8. D. Ben KnobleMay 11, 2026
  9. Junio C HamanoMay 12, 2026

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.