Merge early parts from git://ozlabs.org/~paulus/gitk.git