<?xml version="1.0" ?><entry xml:lang="en" xmlns="http://www.w3.org/2005/Atom" xmlns:planet="http://planet.intertwingly.net/"><id>http://price.mit.edu/blog/?p=45</id><link href="http://price.mit.edu/blog/2010/01/read-write-software/" rel="alternate" type="text/html"/><title>Read-Write Software</title><summary>My favorite moments with free software are when I get annoyed with some manual task that a tool leaves me to do for myself, and then invent a feature that the tool should have to handle the task for me.
With any software free or proprietary, if I’m lucky the tool might have a configuration system [...]</summary><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>My favorite moments with <a href="http://www.fsf.org/about/what-is-free-software">free software</a> are when I get annoyed with some manual task that a tool leaves me to do for myself, and then invent a feature that the tool should have to handle the task for me.</p>
<p>With any software free or proprietary, if I’m lucky the tool might have a configuration system powerful enough to let me effectively add the feature from the outside.  But with free software, I don’t need the authors to have anticipated my needs—I can reach into the guts of the software itself and change it to work the way I want.  If it’s a friendly codebase or if I’ve hacked on it before, I may be able to add my change in a few minutes.  And hey presto: software that does exactly what I wanted.  It’s a lot more fun than <a href="http://arstechnica.com/microsoft/news/2009/10/im-a-pc-and-windows-7-was-my-idea.ars">praying to the vendor</a> and <a href="http://www.nytimes.com/2009/10/22/business/media/22adco.html?_r=3">waiting a few years</a>, and it’s faster and more reliable too.</p>
<p>So it went with <a href="http://git-scm.com/">Git</a> one night last October.  I was repeatedly revising a branch with <tt>git rebase -i</tt>.  A couple of points along the branch were marked as branches of their own, so every time I changed something I would have to either</p>
<ul>
<li>rebase the full branch, then do a dance with <tt>checkout</tt> and <tt>reset</tt> to update the sub-branches, carefully typing the correct new commit IDs;</li>
<li>rebase the full branch, then muck with <tt>update-ref</tt> with the same care about getting commit IDs right; or</li>
<li>rebase the first sub-branch, then use <tt>rebase --onto</tt> to move the next sub-branch on top of it, then <tt>rebase --onto</tt> again for the main branch</li>
</ul>
<p>What I really wanted to do was just</p>
<ul>
<li>rebase the full branch, and tell the sub-branches to come along for<br/>
   the ride.</li>
</ul>
<p>Fortunately I’d worked on the code for Git’s interactive rebase before—at <a href="http://ksplice.com/">Ksplice</a> we push Git to its limits in six different directions, and <tt>rebase -i</tt> we push <a href="http://repo.or.cz/w/git/price.git/log/refs/heads/rebase-i-p">beyond the limits</a> of stock Git—so I knew where to find the moving parts that could do what I needed.  Four minutes after having the idea, I was <a href="http://twitter.com/gnprice/status/4753396800">happily using</a> the new feature.</p>
<p>If you want the feature too, it’s up on <a href="http://repo.or.cz/w/git/price.git/log/refs/heads/rebase-ref">my Git git repo</a>.  Or you can wait until I get it upstream.  Why haven’t I done that already?  That’s another old story about software.  My 4-minute, 4-line patch turned into 29 lines with documentation and with proper error handling, then 147 lines to make the feature easy to invoke, and then 231 lines with test cases.  So I just finished all that work today.  Maybe you’ll see the feature in Git 1.7.1 this spring.</p></div></content><updated planet:format="January 25, 2010 07:30 AM">2010-01-25T07:30:58Z</updated><category term="Uncategorized"/><category term="free software"/><category term="git"/><category term="ksplice"/><category term="sipb"/><author><name>Greg Price</name></author><source><id>http://price.mit.edu/blog</id><link href="http://price.mit.edu/blog/tag/sipb/feed/" rel="self" type="application/rss+xml"/><link href="http://price.mit.edu/blog" rel="alternate" type="text/html"/><title>price.mit.edu/blog » sipb</title><updated planet:format="January 25, 2026 03:07 AM">2026-01-25T03:07:27Z</updated><planet:format>rss20</planet:format><planet:http_etag>&quot;452a10c017d6ace36ea6c313eb650a31&quot;</planet:http_etag><planet:http_last_modified>Mon, 16 Aug 2010 16:26:14 GMT</planet:http_last_modified><planet:bozo>false</planet:bozo><planet:encoding>utf-8</planet:encoding><planet:css-id>gregory-price</planet:css-id><planet:items_per_page>60</planet:items_per_page><planet:name>Gregory Price</planet:name><planet:days_per_page>0</planet:days_per_page><planet:http_status>200</planet:http_status></source></entry>