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

Re: [PATCH] builtin-commit: re-read file index before launching editor

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 11, 2021, 22:09 UTC
Message-ID
<xmqqtugijqe0.fsf@gitster.g>
In-Reply-To
<20211109200123.27763-1-samuelyvon9@gmail.com>
Samuel Yvon <samuelyvon9@gmail.com> writes:
Show 5 quoted lines
>> I do not personally mind if we change the philosophy but because it
>> has been a longstanding designed behaviour, it may need a careful
>> transition plan.
>
> Out of curiosity, what would that involve? 

We need to make sure we do not break workflows of existing users who relies on the current behaviour.

As Git is widely used, it is very likely that some of the workflow element existing users use depend on the current behaviour.

Letting pre-commit do its thing and letting run_status() compute "commitable" without its effect may be something they depend on. It is the same for any other behaviour we may be tempted to modify. We would be breaking Git for them by changing.

So, not breaking by not changing behaviour, if we can do so, would be ideal. Introducing a configuration option and hide the new and different behaviour behind it, so that only the folks who agree to take responsibility of adjusting to the new behaviour, would be a good way to isolate the existing users from the change.

If we come up with a new behaviour that would make the world a better place if adopted by everybody, we might be tempted to eventually make it the _only_ behaviour available to everybody. I am not sure if it is the case here, but if it were, the transition plan would become even more involved. We'd need to start by warning existing users (i.e. the code must detect a case where pre-commit mucks with the index and having an extra "re-read index file" would have made a difference---and tell the user that they must adjust to the change of behaviour in the future), wait for a few years and then flip the behaviour while removing the warning, or something like that.

Previous: Samuel YvonNext: Johannes Schindelin
Message 8 of 18 in “builtin-commit: re-read file index before launching editor”
  1. builtin-commit: re-read file index before launching editorSamuel Yvon via GitGitGadget, Nov 9, 2021
  2. Ævar Arnfjörð BjarmasonNov 9, 2021
  3. samuelyvon9@gmail.comNov 9, 2021
  4. Ævar Arnfjörð BjarmasonNov 9, 2021
  5. Samuel YvonNov 9, 2021
  6. Junio C HamanoNov 9, 2021
  7. Samuel YvonNov 9, 2021
  8. Junio C HamanoNov 11, 2021
  9. Description of github.com/git/git, was Re: [PATCH] builtin-commit: re-read file index before launching editorJohannes Schindelin, Nov 9, 2021
  10. Samuel YvonNov 9, 2021
  11. Junio C HamanoNov 9, 2021
  12. Taylor BlauNov 9, 2021
  13. Samuel YvonNov 9, 2021
  14. Johannes SchindelinNov 10, 2021
  15. builtin-commit: re-read file index before run_statusSamuel Yvon via GitGitGadget, Nov 11, 2021
  16. Junio C HamanoNov 12, 2021
  17. Samuel YvonNov 17, 2021
  18. Junio C HamanoNov 18, 2021

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.