This fixes the below exception in the condition that multiple references are found:
Caught: groovy.lang.MissingPropertyException: No such property: dir for class: GitUtilities
groovy.lang.MissingPropertyException: No such property: dir for class: GitUtilities
at GitUtilities.getCurrentGitDetachedBranch(GitUtilities.groovy:81)
at build.populateBuildProperties(build.groovy:522)
at build.initializeBuildProcess(build.groovy:108)
at build.run(build.groovy:36)
This fixes the below exception in the condition that multiple references are found: