Skip to Content

The Right Tool for the Job: git-stitch-repo

posted 07 Feb 2009

I maintain the acl and attr packages for SuSE and I was bitten by a bug twice last month because these two packages both have a copy of a utility library called libmisc. In summary: I fixed the acl version of libmisc but forgot to copy the patch over and check-in the same fix for attr. Needless to say a user filed a bug a few weeks later against attr too. Doh.

The root of the problem isn't my incompetence, naturally, it is the fact that these two utilities duplicate code instead of sharing. ;)

Yesterday, Christoph Hellwig moved these packages from CVS at SGI to GIT at kernel.org. With the code available via GIT I now had an opportunity to fix the libmisc duplication problem. Initially it wasn't clear how to merge the two histories of these projects together. But, with a bit of Googling I found a great little utility called git-stitch-repo that is designed for exactly that. Here is how I made it happened:

hack..hack..hack

And the result is the merged acl-attr-dev.git. Neat!

blog comments powered by Disqus

About

Brandon Philips by Mujtaba Ali

ifup.org is the weblog of Brandon Philips and contains excerpts from my code, work and play.

I write Linux software and work on the systems layer of Linux. In the last two years I have helped to organize Linux Plumbers Conf and Freedom HEC Taipei. It has been rewarding to bring together these communities to discuss current Linux issues.

Robotics is another passion and I had the opportunity to mentor a FIRST Robotics team in Portland recently too. I also continue to work with my friend Ron Jackson to build some neat USB devices for robotics.