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:

Noel Gomez said...

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

Philip Brocoum said...

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

Linus said...

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

Alexandre said...

$ 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. :-)

pcleddy said...

post title made me laugh

Tim said...

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.

Tim 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 :)

Ronin said...

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?

Dmitriy Kopylenko said...

@Ronin

yes you should.

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

pranith said...

Linus,

Do you miss writing code for Linux?

sigs said...

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 (:

Unknown said...

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 ?

kebomix said...

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 :)

just_a_nerd said...

Nice reference to The Beatles!

Indigenous said...

can you stop your time?

Curt- said...

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.

Anonymous said...

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.

AMIT said...

Its a very well written post.

Alternative energy

igNewSense said...

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

達仁設計學院 said...

autocadproe

3d max資訊王

美食王八卦王
專業教學專業論壇

Anonymous said...

翻譯|醫學美容|汽車報廢|童裝批發|家教|室內裝潢|徵信|清境民宿|催情性藥品

Anonymous said...

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 .

Anonymous said...

farmacia vendita online
achat viagra en ligne
achat levitra en ligne
cialis effetti collaterali
acheter viagra france
apotheke cialis
prix cialis
rezeptfrei viagra
preisvergleich online apotheke
rezeptfrei cialis
cialis wirkung

The Jack said...

Thanks ever so much, very useful article. If you do not mind, please visit my article related to pandeglang district in Banten, Indonesia at Kenali dan Kunjungi Objek Wisata di Pandeglang or Kenali dan Kunjungi Objek Wisata di Pandeglang second and also Kenali dan Kunjungi Objek Wisata di Pandeglang Objek Wisata Air Terjun Curug Gendang and Kesenian Debus, Sejarah dan Ciri Khas Wisata Banten and our hard work at Kerja Keras Adalah Energi Kita that's right Kerja Keras Adalah Energi Kita, and Kenali dan Kunjungi Objek Wisata di Pandeglang Memasuki Babak Akhir also Objek Wisata Taman Wisata Alam Carita, Learn Indonesian language, Kenali dan Kunjungi Objek Wisata di Pandeglang, or Kenali dan Kunjungi Objek Wisata di Pandeglang, also Kenali dan Kunjungi Objek Wisata di Pandeglang, or Kenali dan Kunjungi Objek Wisata di Pandeglang, also Kenali dan Kunjungi Objek Wisata di Pandeglang, or Kenali dan Kunjungi Objek Wisata di Pandeglang, also Kenali dan Kunjungi Objek Wisata di Pandeglang, or Kenali dan Kunjungi Objek Wisata di Pandeglang, very smart thank you!

Anonymous said...

整形外科|童裝批發|春藥|徵信|清境民宿|機票|隔熱紙

Anonymous said...

viagra soft rezeptfrei bestellen
vendita clomid generico
cialis soft rezeptfrei kaufen
kamagra oral jelly en ligne
vendita tamiflu in italia
compra levitra farmacia
vendita clomid generico
kamagra oral jelly en pharmacie
levitra rezeptfrei
cialis bestellen ohne rezept
levitra preco farmacia
viagra generico
comprare farmacia

Anonymous said...

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.

Admin said...

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

Anonymous said...

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

Amit said...

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.

Anonymous said...

propecia ohne rezept bestellen
kamagra oral jelly ohne rezept bestellen
strattera ohne rezept kaufen
sinequan rezeptfrei
accutane bestellen rezeptfrei
amoxil rezeptfrei bestellen
vermox bestellen
amoxil ohne rezept bestellen
viagra soft online bestellen
viagra rezeptfrei bestellen

Admin said...

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

Admin said...

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.

Anonymous said...

farmaci vendita italia
cialis super active ohne rezept bestellen
lioresal achat
acheter pharmacie france
kamagra soft online
farmacia online vendita
accutane farmacia
viagra italia
vigora en pharmacie
cialis italia
viagra soft bestellen
prix viagra
cialis super active farmacia
zithromax rezeptfrei kaufen
prix cytotec france
cialis soft achat en ligne
vendita lovegra
levitra pharmacie
clomid en france
cytotec prix

Sujeet said...

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

Anonymous said...

Acheter du imitrex en Pharmacie
anafranil Rezeptfrei Bestellen
Precio minocin Espana
anafranil Rezeptfrei
lamisil Rezeptfrei
Acheter clomid France
imitrex Rezeptfrei Apotheke
kamagra oral jelly Sin Receta
viagra Rezeptfrei
Comprar cialis super active plus Internet
effexor xr Rezeptfrei Kaufen
viagra Rezeptfrei Bestellen
Achat lamisil en ligne
Comprar kamagra Farmacia

Unknown said...

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

sasha said...
This comment has been removed by the author.
sasha said...

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.

ikie-facebook.blogspot said...

Good article,very helpful,success for you .

Izzy said...

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

Unknown said...

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 ,