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

Re: [PATCH] revision: add --maximal option

From
Derrick Stolee <stolee@gmail.com>
Date
Jan 22, 2026, 15:08 UTC
Message-ID
<85c6fdce-d48a-4af2-ba19-432885a034ab@gmail.com>
In-Reply-To
<xmqqo6mp3zft.fsf@gitster.g>
On 1/19/26 7:22 PM, Junio C Hamano wrote:
Show 28 quoted lines
> Johannes Sixt <j6t@kdbg.org> writes:
>> But even if we decide to use "maximal", the option must be named
>> something other than *just* "--maximal"; this is simply too generic.
>> Perhaps "--only-maximal" or "--maximal-only".
>>
>> Other ideas:
>> - --hide-reachable
>> - --range-head
>> - --range-head-only
>> - --most-recent
>> - --most-recent-only
>>
>>> [--maximal]'s interaction with
>>> --boundary is trivial because no boundary commits would be included as
>>> they are necessarily reachable from a maximal commit.
>>
>> So, --boundary --maximal shows only the maximal commits? That sounds
>> unexpected. Boundary commits are shown with additional mark-up; they
>> don't need to be suppressed. But in a first iteration it's probably
>> better to just make the two options incompatible.
> 
> If I am reading the answer to "what is minimal/maximal elements in
> partially ordered set?" correctly, our "--boundary" essentially is
> to show direct parents of those commits that would be shown with the
> (nonexistent) "--minimal-only" option.  So I agree with you that it
> makes perfect sense to make "--boundary" and "--maximal-only"
> incompatible (it is like asking for both "--minimal-only" and
> "--maximal-only" at the same time).

The existence of a --minimal option that doesn't match the mirror of my suggested --maximal option convinces me to move to --maximal-only. I will send a v2 shortly that updates this and moves the documentation next to other filtering options.

I'll also mark --boundary and --maximal-only as incompatible to avoid confusion.

Thanks, -Stolee

Previous: Junio C HamanoNext: Derrick Stolee via GitGitGadget
Message 8 of 19 in “revision: add --maximal option”
  1. revision: add --maximal optionDerrick Stolee via GitGitGadget, Jan 18, 2026
  2. Johannes SixtJan 18, 2026
  3. Derrick StoleeJan 18, 2026
  4. Johannes SixtJan 19, 2026
  5. Derrick StoleeJan 19, 2026
  6. Johannes SixtJan 19, 2026
  7. Junio C HamanoJan 20, 2026
  8. Derrick StoleeJan 22, 2026
  9. revision: add --maximal-only optionDerrick Stolee via GitGitGadget, Jan 22, 2026
  10. Junio C HamanoJan 22, 2026
  11. Derrick StoleeJan 22, 2026
  12. Junio C HamanoJan 22, 2026
  13. Johannes SixtJan 23, 2026
  14. Junio C HamanoJan 23, 2026
  15. Derrick StoleeJan 23, 2026
  16. Junio C HamanoJan 23, 2026
  17. Derrick StoleeJan 28, 2026
  18. Junio C HamanoJan 29, 2026
  19. Derrick StoleeJan 29, 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.