Generic_git.list_refs() could generate better error messages. * Include invalid line in error message * Improve regexp, match begin of line, maybe match length of hex string? Needs testing iirc the output of ls-remote and show-ref wasn't identical.