Re: Re* [PATCH v4 0/3] advice: add "all" option to disable all hints
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- May 5, 2024, 11:03 UTC
- Message-ID
- <34d77e4d-6edb-99d0-7fc5-fea5224654c7@gmx.de>
- In-Reply-To
- <CAPig+cT-xk13jGEUmpT5QmwVYTxKNUZsu9xJ=Ph3h4AzKHg6pA@mail.gmail.com>
Hi,
On Fri, 3 May 2024, Eric Sunshine wrote:
Show 11 quoted lines
> On Fri, May 3, 2024 at 4:08 PM Junio C Hamano <gitster@pobox.com> wrote: > > It seems that Dscho was in agreement that format-patch's use case > > should try to be more aggressive at least back then. In the message > > in the thread you pointed > > > > https://lore.kernel.org/git/nycvar.QRO.7.76.6.1903211209280.41@tvgsbejvaqbjf.bet/ > > > > he does not give us the exact reason why he does not think the "more > > aggressive" mode is not suitable for other use cases, though. > > Having an answer to that question could be helpful.
Sure.
The `creation factor` essentially tells Git how confident the caller is that the two provided commit ranges contain only matching pairs of patches, no matter how different they look.
When calling `git format-patch --range-diff`, we can be _quite_ certain. Not necessarily 100% (in which case the creation factor would need to be a lot higher than 100), as it does happen that contributors have to drop a patch or two, and add a patch or two, sometimes in the same iteration.
When calling `git range-diff` in general, we can be less certain about that. In fact, users like me often call `git range-diff` to _determine_ whether there are obvious matches (for example, to see whether commits in GitGitGadget PRs have corresponding commits in `seen`).
That difference in certainty is the entire reason why I contend that `range-diff` and `format-patch --range-diff` need different defaults for the creation factor.
Show 5 quoted lines
> > A similar thread was raised more recently: > > > > https://lore.kernel.org/git/rq6919s9-qspp-rn6o-n704-r0400q10747r@tzk.qr/ > > I think I missed this thread.
Heh. I had forgotten about it.
Ciao, Johannes