Weird git gui startup problem

November 9, 2008 – 15:15 | misc | Tags:

This has happened to me for a while every time after I build and install the latest git, but I didn’t really get to the bottom of it until just now. My tinfoil hat umask setting, 0027, finally came around and bit me!

After a fresh rebuild and ‘make install‘, git gui upon starting up would insist on making me choose a repository, even when I start it from a perfectly valid git working directory.

So I found out that it was failing to execute “git rev-parse” during startup, which was due to /usr/local/libexec/git-core/git-rev-parse being installed with mode 750. And that was traced back to the fact that I have umask set to 0027, so the locally built git-add would have mode 750. Since git uses hardlinks to install all the built-in commands, everything hardlinked to git-add would have the same mode, and I end up with bunch of git built-ins owned by root and inaccessible to anybody else.

So the workaround is either ‘chmod o+rx ${git-source-root}/git-add‘ before ‘make install‘, or ‘sudo chmod o+rx ${prefix}/libexec/git-core/*‘ after ‘make install‘.

Trackback from your site, or follow the comments in RSS.

Post a Comment