git/list[1] front-page[2] threads[3] people[4] search[5] about
wed 2026-10-07 16:59 UTC

Re: [PATCH] blame: make diff algorithm configurable

From
Antonin Delpeuch <antonin@delpeuch.eu>
Date
Oct 22, 2025, 09:37 UTC
Message-ID
<d59a2f97-1a69-44f6-924e-7419e36329a0@delpeuch.eu>
In-Reply-To
<xmqqldl51rtm.fsf@gitster.g>
On 20/10/2025 18:05, Junio C Hamano wrote:
Show 18 quoted lines
>>      If the general idea of this patch is judged worthwhile, I would be happy
>>      to add tests to demonstrate the impact of the diff algorithm on blame
>>      output.
> Do not ever say this here.
>
> I've seen from time to time people ask "I am thinking of doing this;
> will a patch be accepted?  If so, I'll work on it." before showing
> any work, and my response always has been:
>
>   (1) We don't know how useful and interesting your contribution would
>       be for our audience, until we see it; and
>
>   (2) If you truly believe in your work (find it useful, find writing
>       it fun, etc.), that would be incentive enough for you to work
>       on it, whether or not the result will land in my tree.  You
>       should instead aim for something so brilliant that we would
>       come to you begging for your permission to include it in our
>       project.
I am surprised by your reaction here, both by its substance and form.

My understanding is that gathering feedback on a proposal before carrying out the implementation work in its entirety is widely accepted as a good practice for contributions to open source projects. For instance, the following guide encourages to do so (in GitHub terms, by proposing an improvement as an issue first, and by opening a draft pull request if necessary):

https://opensource.guide/how-to-contribute/

While this is phrased in the context of GitHub, I think the general principle behind it is healthy. In projects I maintain, I feel bad for contributors who submit contributions that clearly required a significant effort, but that I can't accept for certain reasons. I wish they had got in touch ahead of investing all this work, because I care about their time.

In fact, I already did so for an earlier contribution to this very project, and on that occasion you did not seem to take offense at the fact that my proposal was done without an accompanying patch:

https://lore.kernel.org/git/8bb5e41e-4db9-4527-8492-3aca6a0f40bf@delpeuch.eu/

Has your position changed since? Or did I benefit from more of your kindness back then as a new contributor?

Your argument about my work being worthy on its own even if it's not integrated to your tree is an interesting one, but let me expand on my motivation for this patch. This change is not something I personally need, nor something that is particularly fun to write. I am working on this with the hope that it will eventually make it possible to switch the default to the histogram algorithm, for the benefit of many git users. I see no point for this patch if it is not integrated in your tree. It is a gift to you and to the git community: if the gift is to be declined, I'd rather not spend time crafting it.

Concerning the form, I feel obliged to let you know that from my cultural standpoint, your reply reads rather aggressive. Specifically, the sentence "Do not ever say this here." reads menacing to me, and the use of all caps later on in your reply reads aggressive to me. I'm doing my best to assume that it is not be the attitude you wanted to convey and hope that you can receive this feedback gratefully.

Show 17 quoted lines
>> +	*opt &= ~XDF_NEED_MINIMAL;
>> +	*opt &= ~XDF_DIFF_ALGORITHM_MASK;
>> +	*opt |= value;
>> +
>> +	return 0;
>> +}
>> +
>>   static int is_a_rev(const char *name)
>>   {
>>   	struct object_id oid;
>> @@ -908,13 +941,16 @@ int cmd_blame(int argc,
>>   		OPT_BIT('f', "show-name", &output_option, N_("show original filename (Default: auto)"), OUTPUT_SHOW_NAME),
>>   		OPT_BIT('n', "show-number", &output_option, N_("show original linenumber (Default: off)"), OUTPUT_SHOW_NUMBER),
>>   		OPT_BIT('p', "porcelain", &output_option, N_("show in a format designed for machine consumption"), OUTPUT_PORCELAIN),
>> -		OPT_BIT(0, "line-porcelain", &output_option, N_("show porcelain format with per-line commit information"), OUTPUT_PORCELAIN|OUTPUT_LINE_PORCELAIN),
>> +		OPT_BIT(0, "line-porcelain", &output_option, N_("show porcelain format with per-line commit information"), OUTPUT_PORCELAIN | OUTPUT_LINE_PORCELAIN),
> WHY?

In an attempt to conform to the coding style of this project, I ran `make style`, which generated this change. Given that it is on a line I hadn't touched, I pondered on whether to include it in my patch or not. In the past, I had submitted a patch which fixed a formatting issue in the documentation in passing, together with content changes further down, and you had been supportive of this:

https://lore.kernel.org/git/xmqq1qaeqtw7.fsf@gitster.g/

So I decided to include it this time as well. I am happy to remove it if you prefer not to have it.

I thank you for the rest of your comments and will take them into account for a new version of this patch, pending the discussion above.

Best wishes,
Antonin
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 32 in “blame: make diff algorithm configurable”
  1. blame: make diff algorithm configurableAntonin Delpeuch via GitGitGadget, Oct 20, 2025
  2. Junio C HamanoOct 20, 2025
  3. Antonin DelpeuchOct 22, 2025
  4. Junio C HamanoOct 22, 2025
  5. Phillip WoodOct 23, 2025
  6. blame: make diff algorithm configurableAntonin Delpeuch via GitGitGadget, Oct 28, 2025
  7. Junio C HamanoOct 28, 2025
  8. Antonin DelpeuchOct 28, 2025
  9. blame: make diff algorithm configurableAntonin Delpeuch via GitGitGadget, Oct 28, 2025
  10. Phillip WoodOct 29, 2025
  11. Junio C HamanoOct 29, 2025
  12. Antonin DelpeuchOct 30, 2025
  13. Phillip WoodOct 30, 2025
  14. 0/2 blame: make diff algorithm configurableAntonin Delpeuch via GitGitGadget, Nov 1, 2025
  15. 1/2 xdiff: add 'minimal' to XDF_DIFF_ALGORITHM_MASKAntonin Delpeuch via GitGitGadget, Nov 1, 2025
  16. 2/2 blame: make diff algorithm configurableAntonin Delpeuch via GitGitGadget, Nov 1, 2025
  17. Phillip WoodNov 3, 2025
  18. Phillip WoodNov 3, 2025
  19. Junio C HamanoNov 3, 2025
  20. Junio C HamanoNov 6, 2025
  21. 0/2 blame: make diff algorithm configurableAntonin Delpeuch via GitGitGadget, Nov 6, 2025
  22. 1/2 xdiff: add 'minimal' to XDF_DIFF_ALGORITHM_MASKAntonin Delpeuch via GitGitGadget, Nov 6, 2025
  23. 2/2 blame: make diff algorithm configurableAntonin Delpeuch via GitGitGadget, Nov 6, 2025
  24. Phillip WoodNov 7, 2025
  25. Junio C HamanoNov 7, 2025
  26. Junio C HamanoNov 7, 2025
  27. Junio C HamanoNov 17, 2025
  28. 0/2 blame: make diff algorithm configurableAntonin Delpeuch via GitGitGadget, Nov 17, 2025
  29. 1/2 xdiff: add 'minimal' to XDF_DIFF_ALGORITHM_MASKAntonin Delpeuch via GitGitGadget, Nov 17, 2025
  30. 2/2 blame: make diff algorithm configurableAntonin Delpeuch via GitGitGadget, Nov 17, 2025
  31. Phillip WoodNov 17, 2025
  32. Junio C HamanoNov 17, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.