Re: [PATCH RFC v2 5/5] last-modified: initialize revision machinery without walk
- From
Patrick Steinhardt <ps@pks.im>
- Date
- May 27, 2025, 10:39 UTC
- Message-ID
- <aDWWf2YSgfPrNdrh@pks.im>
- In-Reply-To
- <20250523-toon-new-blame-tree-v2-5-101e4ca4c1c9@iotcl.com>
On Fri, May 23, 2025 at 11:33:52AM +0200, Toon Claes wrote:
Show 15 quoted lines
> In a previous commit we inserted a call to 'prepare_revision_walk()' > before we started our traversal. This was done when we leveraged the > revision machinery more (at the time, we were leaning on > 'log_tree_commit()' which only worked after calling > 'prepare_revision_walk()'). > > But, we have since dropped 'log_tree_commit()', so we don't need most of > the initialization work of 'prepare_revision_walk()'. Now we ask it to > do very little work during initialization by setting the '->no_walk' > flag to '1', which leaves its internal state alone enough that we can > still function as normal. > > Unfortunately, this means that we now no longer complain about > non-commit inputs, since the revision machinery check this for us (it > just silently ignores them).
Hm. Should we maybe have a manual check that all inputs are commits? It doesn't feel right to me to silently ignore invalid queries.
Patrick