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

Re: An alternate model for preparing partial commits

From
RARobert Anderson <rwa000@gmail.com>
Date
Jun 28, 2008, 02:57 UTC
Message-ID
<9af502e50806271957o2df9e0abt9dadcb0514dd4173@mail.gmail.com>
In-Reply-To
<20080628021444.GI5737@dpotapov.dyndns.org>
On Fri, Jun 27, 2008 at 7:14 PM, Dmitry Potapov <dpotapov@gmail.com> wrote:
Show 8 quoted lines
> On Fri, Jun 27, 2008 at 10:14:05AM -0700, Robert Anderson wrote:
>>
>> It is too subtle.  That the index state - which becomes the next
>> committed state - is not available for building or testing before
>> committing is a deep flaw.
>
> And why is that? It is like saying that any editor that does not allow
> you to compile the file without saving it first has a deep flaw.

I don't believe it is like that. It would be like that if you intended for your on-tree disk to have a policy to always compile (for example). That is not a common use-case.

> In Git, commits are not the same as in CVS.
I have not suggested they were.
> You can commit any changes
> and amend them any time later before you publish your changes.

This is enforcing a two-step process where there only need be one the vast majority of the time, to require that commit and publish be separate operations.

> Those who care about quality should have a review process, and the
> review process works best when all changes are slit in a small logical
> steps. How do you propose to that without committing changes first?

I don't understand the question. The entire point of the facility I am proposing is to facilitate creating small clean changesets. Go back and read my original proposal, or Junio's statement of more or less the same idea, to see how it is proposed to do this.

> You can verify it, but you do that _after_ you committed changes but
> before you publish them.

Again, this is requiring two steps when it is otherwise not required, creating an inefficient workflow that is error prone.

> BTW, policy may include that it should be
> compiled and tested on a few platforms, so you cannot do that in
> your working directory anyway.
Huh?  I have done that every day for 15+ years.
> I think the source of your confusion is that you consider git commit
> as cvs commit

No. I have experience with a wide array of source control systems. CVS fits my mental model the least well. git is pretty close, but it is not there yet. The current partial commit facility is the biggest misfire, in my view.

I like that git's philosophy does not include a draconian policy of not changing history. That's fine, it's practical, and it's useful, to cover common scenarios in which you'd like to quickly recover from a mistake. However, I am afraid that these facilities have been abused and turned into something that they are not well-suited for, i.e., the use of lines of development as both keepers of history and of scratch spaces where you scribble around with temporary things, all the while git having no clue which is intended. That these ideas are conflated is a mistake. That's my opinion. These activities ought to occur in separate, logically distinct spaces in which they occur, because they have different requirements and common use-cases.

Bob
Previous: Dmitry PotapovNext: Dmitry Potapov
Message 23 of 57 in “An alternate model for preparing partial commits”
  1. Robert AndersonJun 27, 2008
  2. Björn SteinbrinkJun 27, 2008
  3. stash: introduce 'stash save --keep-index' optionSZEDER Gábor, Jun 27, 2008
  4. Junio C HamanoJun 27, 2008
  5. Robert AndersonJun 27, 2008
  6. Björn SteinbrinkJun 27, 2008
  7. Robert AndersonJun 27, 2008
  8. Johannes SixtJun 27, 2008
  9. Robert AndersonJun 27, 2008
  10. Petr BaudisJun 27, 2008
  11. Robert AndersonJun 27, 2008
  12. Johannes SchindelinJun 27, 2008
  13. Miklos VajnaJun 27, 2008
  14. Robert AndersonJun 27, 2008
  15. Johannes SchindelinJun 27, 2008
  16. Robert AndersonJun 27, 2008
  17. Dana HowJun 27, 2008
  18. Stephen SinclairJun 27, 2008
  19. David JeskeJun 27, 2008
  20. David JeskeAug 13, 2016
  21. Wincent ColaiutaJun 28, 2008
  22. Dmitry PotapovJun 28, 2008
  23. Robert AndersonJun 28, 2008
  24. Dmitry PotapovJun 28, 2008
  25. Junio C HamanoJun 27, 2008
  26. Robert AndersonJun 27, 2008
  27. Jeff KingJun 28, 2008
  28. Robert AndersonJun 28, 2008
  29. Jeff KingJun 28, 2008
  30. Junio C HamanoJun 28, 2008
  31. Johannes SchindelinJun 28, 2008
  32. Jeff KingJul 8, 2008
  33. David JeskeJun 27, 2008
  34. Jakub NarebskiJun 27, 2008
  35. David JeskeJun 27, 2008
  36. David JeskeAug 13, 2016
  37. David JeskeAug 13, 2016
  38. Robert AndersonJun 27, 2008
  39. Robert AndersonJun 27, 2008
  40. Junio C HamanoJun 27, 2008
  41. Robert AndersonJun 28, 2008
  42. Dmitry PotapovJun 28, 2008
  43. Robert AndersonJun 28, 2008
  44. Stephen SinclairJun 28, 2008
  45. Robert AndersonJun 28, 2008
  46. Robert AndersonJun 28, 2008
  47. Jakub NarebskiJun 28, 2008
  48. Robert AndersonJun 28, 2008
  49. David JeskeJun 28, 2008
  50. David JeskeAug 13, 2016
  51. Stephen SinclairJun 28, 2008
  52. David JeskeJun 28, 2008
  53. David JeskeAug 13, 2016
  54. Fwd: An alternate model for preparing partial commitsRobert Anderson, Jun 28, 2008
  55. Dmitry PotapovJun 28, 2008
  56. Robert AndersonJun 28, 2008
  57. Dmitry PotapovJun 28, 2008

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.