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

Re: Fwd: An alternate model for preparing partial commits

From
Dmitry Potapov <dpotapov@gmail.com>
Date
Jun 28, 2008, 12:38 UTC
Message-ID
<20080628123827.GM5737@dpotapov.dyndns.org>
In-Reply-To
<9af502e50806272331vfdbf35ap10fc4375518de946@mail.gmail.com>
On Fri, Jun 27, 2008 at 11:31:24PM -0700, Robert Anderson wrote:
Show 7 quoted lines
> On Fri, Jun 27, 2008 at 9:03 PM, Dmitry Potapov <dpotapov@gmail.com> wrote:
> > Do you think commit only tested changes is a common policy among
> > Git users?
> 
> I think there are various flavors of "tested" for which the answer is
> certainly yes.  I think that a line of development which always
> builds, for example, is very, very common.

Well, I don't think it is very common. Almost always builds, yes. As I said before, with Git commit means more like saving your changes in logical steps. Making sure that they are good enough to be publish is done later, and it usually includes testing and may include something else like code review, and code review is much easier if your work is recorded in small logical steps, and when you can share these changes easily and continue your normal work while your changes are reviewed.

Show 7 quoted lines
> >> 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.
> >
> > I don't see it is a problem.
> 
> Fine, you like doing extra work for no benefit.  Enjoy yourself.

I don't see where you find this extra work. Maybe, pressing a button to save the file is also extra work? As to benefit, they are real for me as it saves a lot of time and allows me to work more natural, in the same way as you edit document. Your first version of document does not have to be perfect, you can review and improve it later, instead you focus on main ideas you want to express, and later, you will proofread and rearrange things, but it is very important to being able to save your changes even if they are not perfect yet. Extra work like pressing the save button is negligible comparing to everything else.

> > You have your working directory let's say on Linux, and you have to
> > test your changes on Windows. So what do you do?
> 
> I rebuild on about a dozen platforms simultaneously on a cross-mounted disk.

Does it work for MS Visual Studio? The last time I tried, it did not allow to build the project on a shared disk. Anyway, your compilation time is going to be worse due to network latency, and simultaneously building on different platforms will be more difficult to organize. With Git, you get everything for free. You committed your changes and they immediately available everywhere, and when all tests passed you can push changes to the main branch, or send to the integrator a request to pull, or to send a request to code review. It all depends on your policy...

Show 5 quoted lines
> > I don't see why git should know it.
> 
> Clearly not.  Example 1:  is it ok to publish?  If temporary commits
> exist, git should stop you.  But git has no idea if temporary commits
> exist or not.

There are no such thing as temporary commits in Git. There are changes that are ready to be accepted to the main branch and those that are not. It could be different reasons why these changes cannot be integrated to the main branch now. Maybe, you should receive feedback from someone who does code review your changes. Maybe, these changes deem too risky to be integrated now. Maybe, they will clash with someone else's work, which has a higher priority, maybe something else. So, I don't see how you expect Git to know all of that. It is like to expect that your word processor to know what whether your document is good work publication or not, and don't let you to send the document out if it is not.

Dmitry
Previous: Robert AndersonNext: Robert Anderson
Message 55 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.