Handle ambiguous refs in CommitLanguages
When a tag and branch of the same name exist, e.g. tags/master and
heads/master, git rev-parse
will default to the tag.
If this is a tag object, git-linguist
will fail with error
the requested type does not match the type in the ODB
. This is one
of the scenarios that triggers #2294 (closed).
This change adds a check for git rev-parse
warning on an
ambiguous ref. When this occurs, rev-parse
is run again with the ref
explicitly qualified as heads/<REFNAME>
to remove the ambiguity.
Edited by GitLab Release Tools Bot