Re: [PATCH v8] revision.c: implement --max-count-oldest
- From
Mirko Faina <mroik@delayed.space>
- Date
- May 19, 2026, 01:04 UTC
- Message-ID
- <agu1rZe0BiNowmBT@exploit>
- In-Reply-To
- <8210d60832b9a58aa4d71fc3790e44d8989564ce.1779152064.git.mroik@delayed.space>
On Tue, May 19, 2026 at 02:55:22AM +0200, Mirko Faina wrote:
Show 17 quoted lines
> --max-count is a commit limiting option sets a maximum amount of commits > to be shown. If a user wants to see only the first N commits of the > history (the oldest commits) they'd have to do something like > > git log $(git rev-list HEAD | tail -n N | head -n 1) > > This is not very user-friendly. > > Teach get_revision() the --max-count-oldest option. > > Signed-off-by: Mirko Faina <mroik@delayed.space> > --- > Documentation/rev-list-options.adoc | 5 +- > revision.c | 111 +++++++++++++++++++++++++++- > revision.h | 2 + > t/t4202-log.sh | 41 ++++++++++ > 4 files changed, 155 insertions(+), 4 deletions(-)
Sorry, forgot to write down what changed since v7. There was an issue with the counting as --max-count-oldest counted boundary commits too. That is simply solved by only adding on non boundaries.
That left another issue, there are now some "orphaned" boundaries when printing the graph. In addition to that, because of how the graph machinery works, the graph is now trying to include the parents of the orphaned boundaries. To fix this we just flip the CHILD_SHOWN flag on the parents of the commit we're discarding.
Hopefully this is the last version.