Thursday, May 10, 2007

mutt and git format-patch

Earlier today, I was looking for some basic instructions on using git-format-patch with mutt. It turns out to be really easy.
$ git branch
* log-decorate
  master
$ git format-patch origin
0001-Document-git-log-decorate.patch
$ mutt -H 0001-Document-git-log-decorate.patch
Then enter the To: address, accept the Subject:, add any touch ups, and send. When mutt's finished, it'll exit. Receiving and applying patches through mutt is pretty easy also. Using mutt trickiness, these steps can be automated, but here's the basic process:
  1. Find the email with the patch you want to apply
  2. Press s (or whatever save-message is bound to)
  3. Enter a path where you want to save the message
  4. Repeat steps 1-3 (entering the same path) to save additional patches in a mailbox
  5. Apply the patches while in your working tree: git am /path/to/patch-mailbox
Each patch is applied as a single commit. Read the documentation for git cherry to determine which of your patches have been applied upstream.

Saturday, May 5, 2007

Terminal.app: Selecting Pathnames

I come from a Linux background. In most Linux terminal applications, you can double-click anywhere inside a path such as lib/WCIT/DBA.pm and the entire path is selected and copied to the clipboard. In OS X's Terminal.app, double-clicking anywhere inside a path only selects up to the bracketing / characters. For example, if I double-clicked somewhere inside WCIT, it would only select that word. I found it quite frustrating to have to click and drag to select the entire path. Today, I discovered that you can hold Option while double-clicking to select the entire path. You still have to manually copy the text to the clipboard, but that's not too bad. Apple provides a help document about selecting text in OS X, but it doesn't mention this trick.

Wednesday, May 2, 2007

Google-hosted blogging

Although the URL for this blog is blog.ndrix.com, it's not actually hosted on the ndrix.com virtual server. It's actually hosted by Google on blogger.com.

Hosting a blog like this is pretty easy. Blogger provides instructions for doing blog hosting. The trickiest part is establishing the CNAME records for your new domain. The DNS hosting company that I use (zoneedit.com) provides a simple web interface for creating CNAME records:
  1. Click on Aliases (CNAME) in the top menu
  2. Enter blog.yourdomain.com in the Alias box
  3. Enter ghs.google.com in the Actual Name box
  4. Click Add New Alias

Welcome

Welcome to the Hendricks Solutions blog.