Re: [PATCH v4 2/6] connected: do not sort input revisions
From: Junio C Hamano <hidden>
Date: 2021-08-06 16:50:48
Patrick Steinhardt [off-list ref] writes:
Wouldn't that effectively change semantics though? If the user passes `git rev-list --no-walk=unsorted --no-walk`, then the result is a sorted revwalk right now. One may argue that most likely, nobody is doing that, but you never really know.
True.
An easier approach which keeps existing semantics is to just make
`--no-walk` and `--unsorted-input` mutually exclusive:
- If the `unsorted_input` bit is set and `no_walk` isn't, and we
observe any `--no-walk` option, then we bail.
- Likewise, if the `no_walk` bit is set, then we bail when we see
`--unsorted-input` regardless of the value of `unsorted_input`.
This would keep current semantics of `--no-walk`, but prohobit
using it together with the new option.True again. As I said, I do prefer going in the "start tight to forbid combination" route. But as I pointed out, the coverage by the posted patch seemed to have gap(s). Thanks.