BF: replace show-ref with rev-parse --verify for determining current treeish location

git show-ref -s HEAD  has shown to not work in all scenarios
and git rev-parse --help provides this as an ultimate example:

         ·   Print the object name of the current commit:

               $ git rev-parse --verify HEAD

Please verify that it works for you before merging ;)