only write git info if available