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

Re: non-empty index with git commit -a

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Feb 16, 2011, 08:44 UTC
Message-ID
<20110216084452.GC3345@elie>
In-Reply-To
<AANLkTikmxHQpir5YbiBihASL1SYf_AyoUHKT3nqKS-iP@mail.gmail.com>
Nguyen Thai Ngoc Duy wrote:
> On Wed, Feb 16, 2011 at 3:18 PM, Sverre Rabbelier <srabbelier@gmail.com> wrote:
>> On Wed, Feb 16, 2011 at 03:20, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 14 quoted lines
>>> If I remember the discussion[1] correctly, by requiring a separate
>>> add -u step (or commit -f -a) if the "I don't trust my fingers"
>>> configuration is enabled.
>>
>> That would definitely work for me. The question then is, should git
>> consider the index precious by default, or not? That is, should that
>> value default to true in 1.8?
>
> Is it insane that "git commit -a" still commits everything, but then
>
> 1. If old index is different from old HEAD, keeps index as is and warn users
> 2. If old index is the same as old HEAD, update index with new HEAD
>
> ?
Yes, I think that would be very confusing. :)

My take on Sverre's question: this doesn't seem to fit the "bad choice made long ago and finally we have a chance to fix it" mold. More like "nice new feature that could break muscle memory". So I don't think it makes sense to tie it to 1.8.

If I were writing the patch, I'd provide the configuration and hope that the experience of using it could help with deciding on a good default behavior.

Previous: Nguyen Thai Ngoc DuyNext: Jeff King
Message 7 of 25 in “non-empty index with git commit -a”
  1. Sverre RabbelierFeb 15, 2011
  2. Jeff KingFeb 16, 2011
  3. Jonathan NiederFeb 16, 2011
  4. Jeff KingFeb 16, 2011
  5. Sverre RabbelierFeb 16, 2011
  6. Nguyen Thai Ngoc DuyFeb 16, 2011
  7. Jonathan NiederFeb 16, 2011
  8. Jeff KingFeb 16, 2011
  9. Sverre RabbelierFeb 16, 2011
  10. Jeff KingFeb 16, 2011
  11. Sverre RabbelierFeb 16, 2011
  12. Jeff KingFeb 16, 2011
  13. Michael J GruberFeb 16, 2011
  14. Jeff KingFeb 16, 2011
  15. Junio C HamanoFeb 16, 2011
  16. Jeff KingFeb 16, 2011
  17. Junio C HamanoFeb 16, 2011
  18. Jeff KingFeb 16, 2011
  19. Jakub NarebskiFeb 16, 2011
  20. Junio C HamanoFeb 16, 2011
  21. Jeff KingFeb 16, 2011
  22. Matthieu MoyFeb 16, 2011
  23. Jeff KingFeb 16, 2011
  24. Junio C HamanoFeb 16, 2011
  25. Matthieu MoyFeb 16, 2011

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.