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

Re: seperate commits for objects already updated in index?

From
Junio C Hamano <junkio@cox.net>
Date
Mar 15, 2006, 19:25 UTC
Message-ID
<7vlkvbik8f.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<44181DFE.7080204@op5.se>
Andreas Ericsson <ae@op5.se> writes:
Show 6 quoted lines
> Can't this be done by updating .git/index first and then use the
> temporary index to commit? Then .git/index would match the current
> tree and everybody would be happy with very little tweaking. Doing the
> temporary index commit first could cause data-loss as described above
> if the updating of .git/index somehow fails and the user is unaware of
> it (or what to do to fix it).

You have to think about how to rewind it when the user decides later not to commit by for example giving an empty commit message or killing the editor. The order of things need to be to populate the index to be committed so that we can give preview in the commit log template upon 'commit -v', spawn the editor and get the final version of log, and then make a commit. So it may or may not be doable -- I haven't thought about it through, and currently have not much incentive nor inclination to think about it myself right now.

Previous: Andreas EricssonNext: Andreas Ericsson
Message 10 of 11 in “seperate commits for objects already updated in index?”
  1. Paul JakmaMar 14, 2006
  2. Linus TorvaldsMar 14, 2006
  3. Paul JakmaMar 14, 2006
  4. Linus TorvaldsMar 14, 2006
  5. Paul JakmaMar 14, 2006
  6. Junio C HamanoMar 14, 2006
  7. Junio C HamanoMar 15, 2006
  8. Paul JakmaMar 15, 2006
  9. Andreas EricssonMar 15, 2006
  10. Junio C HamanoMar 15, 2006
  11. Andreas EricssonMar 15, 2006

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.