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

Re: [PATCH] range-diff: add --matched-only to skip one-sided commits

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 11, 2026, 19:05 UTC
Message-ID
<xmqqik4ba9sq.fsf@gitster.g>
In-Reply-To
<CAHwyqnWVXuDMAonj1jK9687xhjiT4h-0E2qzhjwPXOTKfMhoGQ@mail.gmail.com>
Harald Nordgren <haraldnordgren@gmail.com> writes:
Show 15 quoted lines
>> > Seems like a big change, and deprecated options are a pain in the neck
>> > because we can never actually remove them.
>> >
>> > If we decide to go this way, we might name them "--hide-{left,right}"
>> > and just not introduce a condition that makes them incompatible. Then
>> > "--matched-only" would be pure syntactic sugar and wouldn't even be
>> > 100% necessary to have to achieve this.
>>
>> Or we can just keep the code and fix the documentation.  I think
>> that would be much less impact.
>
> I agree.
>
>
> Harald

I thought I'd try my own version, but it seems that we can simply remove the misleading sentence and the remainder already is very easy to read and understand ;-)

`--matched-only`::
	Only emit commits that have a corresponding commit in the other
	range, suppressing any commit that exists on only one side.  Useful
	to skip added or removed commits when reviewing how the commits
	that survived a rebase changed.
Previous: Harald NordgrenNext: Harald Nordgren via GitGitGadget
Message 6 of 23 in “range-diff: add --matched-only to skip one-sided commits”
  1. range-diff: add --matched-only to skip one-sided commitsHarald Nordgren via GitGitGadget, Sep 11, 2026
  2. Junio C HamanoSep 11, 2026
  3. Harald NordgrenSep 11, 2026
  4. Junio C HamanoSep 11, 2026
  5. Harald NordgrenSep 11, 2026
  6. Junio C HamanoSep 11, 2026
  7. range-diff: add --matched-only to skip one-sided commitsHarald Nordgren via GitGitGadget, Sep 11, 2026
  8. Junio C HamanoSep 14, 2026
  9. range-diff: add --matched-only to skip one-sided commitsHarald Nordgren via GitGitGadget, Sep 15, 2026
  10. Junio C HamanoNov 2, 2026
  11. Harald NordgrenNov 2, 2026
  12. Ben KnobleNov 2, 2026
  13. Harald NordgrenNov 2, 2026
  14. Harald NordgrenNov 2, 2026
  15. Matt HunterNov 3, 2026
  16. Junio C HamanoNov 3, 2026
  17. Ben KnobleNov 3, 2026
  18. Matt HunterNov 3, 2026
  19. Junio C HamanoNov 3, 2026
  20. Kristoffer HaugsbakkNov 4, 2026
  21. Ben KnobleNov 4, 2026
  22. Kristoffer HaugsbakkNov 4, 2026
  23. Junio C HamanoNov 2, 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.