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

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
Merge pull request #173 from yarikoptic/upstream-0.17

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