Re: [PATCH] revision.c: implement --reverse=before for walks
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 20, 2026, 16:06 UTC
- Message-ID
- <xmqqv7dlr4yz.fsf@gitster.g>
- In-Reply-To
- <fbea5f1c-946b-400e-a9a2-2c6d7b088d46@malon.dev>
Tian Yuchen <cat@malon.dev> writes:
> I think the space complexity here could be reduced a little. After all, > since we’re only retrieving a few commits, there’s no need to load the > entire reversed commit history into memory.
Does "we're only retrieving a few commits" come from the fact that the command example is "log --reverse -3"?
- What should happen when you give "git log --reverse=before" without "--max-count=3"?
- What should happen without "--max-count" but other limiting options, like "--author=Tian" or "--min-parents=2"?
It might be that the right way to look at this new feature is not that "we are changing where reverse is applied", but "count limit is applied much later than usual", which may mean at the UI level, it may not be good at the conceptual level to sell this as an extension to the "--reverse" option? I dunno.