Thursday, June 11, 2009

Happiness is a warm SCM

I'll have to post this while I'm still happy, because the merge window for Linux 2.6.31 opened a day ago (well, somewhat more, but I don't take patches immediately after doing a release), and so far it's been such a nice thing that I thought I'd better post while in a good mood. Before somebody sends me the merge request from hell.

So why am I in a good mood?

My real "work" is not really writing code any more, and hasn't been for a long time. No, I worry most about the whole "flow of patches", and the way development happens, rather than so much about any individual piece of code I maintain. And the last few release cycles have had a couple of really hard-to-merge issues - not because the code was necessarily bad, but because of how it was then presented to me as a fairly messy history.

And so far, the 2.6.31 merge window is going swimmingly. The x86 tree, which has gone through a yo-yo of different development models with (different) problems, seems to have gotten to that "good place" where it seems to be working.

Part of the problem is that 'git' is such a flexible tool that you can use it in various modes, and mix things up freely. The whole distributed nature means that there's no gatekeeper, you can do whatever you want. And the flexibility and power is good, but it does mean that it's also easy to make a mess of it - the old UNIX philosophy of giving people rope, and letting them hang themselves with it if they want to.

So it takes time for people (me included) to learn the rules that work. And it seems people are learning. And that feels really good.

42 comments:

  1. As a Git n00b, would be nice to see a post on what these "rules that work" are.

    ReplyDelete
  2. Second. I'd like to see how the person who invented git actually uses it.

    ReplyDelete
  3. noel/Stedwick: it's basically a matter of finding the right balance on a couple of different axises:

    "clean history":

    Balancing the need to clean up after mistakes (aka "rewriting history") using tools like 'git rebase', but then not doing it so much that you actually rewrite other peoples commits or lose all sight of the important history (like the fact that you tested one particular test, and if you then rewrite the history, all your testing is now dubious).

    "Merging too much vs too little":

    Merging is nice, because if you have concurrent development, a merge will tie the two branches together and allows you to test and develop on top of both changes.

    But the downside is that merging too eagerly means that two separate branches that are for two different features are now tied together, and you can never separate the two (at least without re-doing the whole history).

    So merging too much results in a very messy history, where you can't see what the actual different "topics" were. And it results in a tree where upstream (that is - me) can't review and pull the features one by one.

    There's a few rants and rules about this that I did on the mailing lists last merge window. See for example rant

    ReplyDelete
  4. $ git diff v2.6.30 HEAD --stat | tail -1
    1310 files changed, 100248 insertions(+), 33915 deletions(-)

    Wow, I would be happy too if I could merge that much code in a day. I bet you would be the record holder of the greatest amount of code merged in a day if the Guinness World Record had an entry for that. :-)

    ReplyDelete
  5. The Xen pull requests were a _really_ good lesson on how to use Git to really see how much of a pain something would be to merge - not just now but in the future. And here I was thinking that I was actually getting a grasp on what Git could do :)

    My first DSCM was Mercurial, but it was Git that really opened my eyes to a better design. Git makes your _life_ easier, especially when you have to take over maintenance of other people's complex code.

    I still have to use Subversion for several projects .. I cringe every time I need to merge.

    ReplyDelete
  6. Also, Linus is not the _only_ author of Git. Though, I swear, if they work on it any more it will become sentient.

    That would be neat, at least I could reason with it :)

    ReplyDelete
  7. What are the real advantages of Git? I am an fairly new developer in the open source world, and I am just starting to get used to subversion way of doing things... should I learn Git instead?

    ReplyDelete
  8. @Ronin

    yes you should.

    Check out this resource to help you make an educated decision: http://whygitisbetterthanx.com/

    ReplyDelete
  9. Linus,

    Do you miss writing code for Linux?

    ReplyDelete
  10. Even though I understand the utility of a command-line SCM in merging huuuge piles of patches, I really really would like to have a graphical interface to git version history graph if I store my own stuff in there. That's *because* of local branching and other features that make the mental picture of a development tree messy. I like thinking visually.

    Or am I doing it wrong? I mean, should I maybe concentrate on "features" instead of "branches" and "lines of development"? I see a lot of potential in trying things out in their own branches but even having briefly tried git it still doesn't feel uncumbersome... if I had a version graph in front of me where I could point-and-click at different revisions and build them on the spot I'd feel a lot more confident with branching (:

    ReplyDelete
  11. Sigs: Isnt "gitk" atleast partially what you are asking, its gui app and shows your branches (remotes too if you have those checked out) and shows the history of things have evolved into what you have now in any point in time ?

    ReplyDelete
  12. hey Linus , i would like to thank you very much for your efforts on New Linux.com , and the new kernel is really awesome , it is very fast :D :D .

    your fan in Egypt :)

    ReplyDelete
  13. I may prefer Debian Stable for a distribution, but I must admit to LOVING having the latest kernel.

    Torvalds-san, Edison didn't invent most of what he patented, what he did was create an environment of invention that was a creation all itself.

    I've been using the Linux kernel since 1995, and I am glad to say, Thank You.

    Thank you for bringing together so many wonderful people to create the Linux kernel.

    ReplyDelete
  14. Tom said:

    "Also, Linus is not the _only_ author of Git. Though, I swear, if they work on it any more it will become sentient.

    "That would be neat, at least I could reason with it :)"

    I suggest you check the dictionary definition of "git" to see why that would be no great achievement.

    ReplyDelete
  15. Linus,
    Lots of merging issues. Would like to meet if possible. Leaving to Europe and later Asia in a couple of days. Please text me to 5038809444.
    Thank You,
    Tadas

    ReplyDelete
  16. mobile phones price and performance are a pair of contradiction. The word "shanzhai" is very popular in China. It is industry phenomenon of imitation, high quality and low price. Moreover, cell phones are the representative of them.The global financial crisis led to a significant shrinkage of assets for people. "china wholesale" demonstrate the might. most of them would like buy the cheap cell phones now .

    ReplyDelete
  17. Tiffany jewelry has been an

    incontrovertible perfect gift idea. Here we have hundreds of cheap and discounted
    tiffany silver jewelry,including tiffany rings, tiffany bangles,

    tiffany necklaces

    (
    tiffany necklace
    ), charms, tiffany earrings,

    tiffany cuff links

    (
    tiffany cufflinks
    ),and

    tiffany money clips
    ,

    tiffany key rings
    for your choice. All our jewelry is 925
    tiffany sterling silver

    guaranteed.

    ReplyDelete
  18. I've been using the Linux kernel since 1995, and I am glad to say, Thank You.

    Thank you for bringing together so many wonderful people to create the Linux kernel.

    "Merging too much vs too little":

    Merging is nice, because if you have concurrent development, a merge will tie the two branches together and allows you to test and develop on top of both changes.

    But the downside is that merging too eagerly means that two separate branches that are for two different features are now tied together, and you can never separate the two (at least without re-doing the whole history).
    --------------------------------

    wisata riau

    blogger tutorial

    Pesta Blogger

    Kuansing

    Pekanbaru Riau

    Hibah Sejuta Buku

    ReplyDelete
  19. Really it's a nice site it gives the idea about,I'll have to post this while I'm still happy, because the merge window for Linux 2.6.31 opened a day ago (well, somewhat more, but I don't take patches immediately after doing a release), and so far it's been such a nice thing that I thought I'd better post while in a good mood. Before somebody sends me the merge request from hell. free mp3 music

    ReplyDelete
  20. Thanks for sharing this post, it rally nice and also it is nice to found that it uses less code which is really time consuming and it also better for x86 architecture.

    ReplyDelete
  21. Yeah.. i like this content...
    My real "work" is not really writing code any more, and hasn't been for a long time. No, I worry most about the whole "flow of patches", and the way development happens, rather than so much about any individual piece of code I maintain. And the last few release cycles have had a couple of really hard-to-merge issues - not because the code was necessarily bad, but because of how it was then presented to me as a fairly messy history.
    --------------------------
    Belajar SEO|Hibah Sejuta Buku|Riau Bisnis Online|Pekanbaru Riau

    ReplyDelete
  22. Or am I doing it wrong? I mean, should I maybe concentrate on "features" instead of "branches" and "lines of development"? I see a lot of potential in trying things out in their own branches but even having briefly tried git it still doesn't feel uncumbersome... if I had a version graph in front of me where I could point-and-click at different revisions and build them on the spot I'd feel a lot more confident with branching.
    Pekanbaru Riau
    My first DSCM was Mercurial, but it was Git that really opened my eyes to a better design. Git makes your _life_ easier, especially when you have to take over maintenance of other people's complex code.

    I still have to use Subversion for several projects .. I cringe every time I need to merge.

    ReplyDelete
  23. Good blog contained great information!i like it and i will utilize some tricks in myWork at home jobs project which is about an business system! Thanks for sharing!

    Work at home jobs project

    ReplyDelete
  24. Thanks for this explanation Part of the problem is that 'git' is such a flexible tool that you can use it in various modes, and mix things up freely

    Hi this is my first time visit to your blog, thanks for sharing the valuable information oh yeah if you have an interest in Tourism and vacation destination so you can get the idea about the great place to visit in your holiday. or if you love to see the bizarre and weird news around the world you can go to Crazy World or the World Most Craziest Pictures and also the craziest news in the World Must Be Crazy

    Don't forget to read about the Menstruating Ghost of Puncak you can read it on Kaskuz News OK thanks a lot Revarius Opinion.

    Berita Ekstrim Blog
    Chevy Trucks
    Celeb Toob
    Girls Modele
    Healthy Lifestyle
    Celebrity News and Update
    Dunia Celeb
    Berita Ekstrim
    Lowongan Kerja Terbaru

    Thanks for the information

    Denise Milani in Sexy Red Sweater
    Denise Milani sexy black dress
    Denise Milani in Sexy Teacher Set
    Denise Milani Officer Set
    Best Photo Denise Milani

    Revarius Nite
    Revarius Journal
    Crazy Tube

    ReplyDelete
  25. This comment has been removed by the author.

    ReplyDelete
  26. my favorite brand in shoes is D
    Fly London Shoes because Fly London shoes remain at the cutting edge of fashion and style world because of their uncompromising and unique designs which keeps on changing and innovating every season.

    ReplyDelete
  27. Good article,very helpful,success for you .

    ReplyDelete
  28. wow! amazing blog! I really like it because I learn a lot of this topic, thanks!! Also I want to know if you have any blog about generic propecia

    ReplyDelete
  29. Hi happiness is warm scm yeah happiness is amazing when you happy everything is great cause you see everything different ,so when you happy you can Buy viagra and feel more happy after you use it ,

    ReplyDelete