Current, when a JGit internal exception "Invalid ref name: HEAD" occurred, we don't have any valuable information about the problem:
We need to have more detail for understanding:
- What is the value of the Git reference, e.g. is it refs/heads/master?
- Does the reference exist?
- Does the reference point to an existing object id?