stop failure to get commit id when in a git repository but not on
a tagged branch (fd 5 was non-existent).  Not tested with a tagged
branch.