git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 1/2] add -p: mark split hunks as undecided

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 16, 2025, 16:03 UTC
Message-ID
<xmqq4it2pep0.fsf@gitster.g>
In-Reply-To
<cc2a8fa7-be27-48a6-8699-c500d894404b@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
Show 13 quoted lines
> To me, the current behavior is strange enough to be considered a bug
> but when we discussed this before you were not so sure and said [1]
>
>     Given our user base has grown quite a bit over the years, it
>     almost is a given that any change to existing behaviour is a
>     regression to somebody.  Certainly a safe material for Git 3.0
>     but I do not know if it is safe enough for 2.50 for example.
>     The strategy to leave it longer in 'next' did not work well
>     to catch potential issues for another topic during this cycle,
>     but we could try it out again.
>
> So I re-rolled using WITH_BREAKING_CHANGES. If you're happy just to
> change the behavior unconditionally I can go back to V1
I am *NOT* happy with breaking changes.

Either you cut off those who you do not believe exist because the behaviour is so strange and useless (i.e. immediate "this is a bugfix, there is no mechanism to keep the broken behaviour even for a short period"), which is much better than that from my eyes if I were to be convinced that the old behaviour is nonsense, or you support them with configuration without any future deprecation, which is also fine by me.

The breaking changes mechanism is to be used only when we are convinced that the old way is nonsense, we are fairly sure that no sane user is using it, and we have concensus that the old way MUST be abandoned and any existing users MUST be retrained to use the new ways, and only to buy/give some time to these users that needs retraining.

Have we got that firm sense in the community that the old behaviour qualifies for breaking change mechanism? I don't, at least not yet.

Show 10 quoted lines
>> On the other hand, assuming it is not a bugfix but introducing a
>> different behaviour, where both the original and the new ones are
>> useful depending on the situation, wouldn't it be better to give
>> users choices at runtime instead, with a configuration variable at
>> least, but possibly with a interactive command to choose which
>> behaviour is used on demand?
>
> I'm not really convinced the current behavior is that useful and it is
> such an esoteric use of 'add -p' that I'm not sure it makes sense to
> add a config setting for it.

If so, let's break it first and see if anybody screams. Touching the breaking changes mechanism is way too early before doing that, I think.

Previous: Phillip WoodNext: Phillip Wood via GitGitGadget
Message 19 of 27 in “add -p: a couple of hunk splitting fixes”
  1. 0/2 add -p: a couple of hunk splitting fixesPhillip Wood via GitGitGadget, Feb 21, 2025
  2. 1/2 add -p: mark split hunks as undecidedPhillip Wood via GitGitGadget, Feb 21, 2025
  3. Justin ToblerFeb 21, 2025
  4. Junio C HamanoFeb 21, 2025
  5. phillip.wood123@gmail.comFeb 26, 2025
  6. Junio C HamanoFeb 26, 2025
  7. phillip.wood123@gmail.comFeb 27, 2025
  8. Junio C HamanoFeb 27, 2025
  9. Phillip WoodFeb 28, 2025
  10. Junio C HamanoFeb 28, 2025
  11. Phillip WoodMar 4, 2025
  12. 2/2 add-patch: update hunk splitability after editingPhillip Wood via GitGitGadget, Feb 21, 2025
  13. Justin ToblerFeb 21, 2025
  14. Junio C HamanoFeb 21, 2025
  15. 0/2 add -p: a couple of hunk splitting fixesPhillip Wood via GitGitGadget, Sep 15, 2025
  16. 1/2 add -p: mark split hunks as undecidedPhillip Wood via GitGitGadget, Sep 15, 2025
  17. Junio C HamanoSep 15, 2025
  18. Phillip WoodSep 16, 2025
  19. Junio C HamanoSep 16, 2025
  20. 2/2 add-patch: update hunk splitability after editingPhillip Wood via GitGitGadget, Sep 15, 2025
  21. 0/2 add -p: a couple of hunk splitting fixesPhillip Wood via GitGitGadget, Sep 25, 2025
  22. 1/2 add -p: mark split hunks as undecidedPhillip Wood via GitGitGadget, Sep 25, 2025
  23. Junio C HamanoSep 25, 2025
  24. Phillip WoodSep 26, 2025
  25. Junio C HamanoSep 26, 2025
  26. Phillip WoodOct 8, 2025
  27. 2/2 add-patch: update hunk splitability after editingPhillip Wood via GitGitGadget, Sep 25, 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.