def _fmt_cmd_for_err(cmd):
    """
    Join a git cmd, quoting individual segments first so that it's
    relatively easy to see if there were whitespace issues or not.
    """
    return ' '.join(['"%s"' % seg for seg in cmd])