Find all git-refs with desired suffix; choose shortest one

This pull request proposes a fix for https://github.com/opscode/chef/issues/2065

Currently, the output of ```git ls-remote``` is parsed for lines ending with the specified revision. If multiple tags happen to match, the first is returned, which may not represent the desired content.

This change finds all matches, and then returns the match of the shortest length. If the shortest length match does not represent the desired content, then the revision value can be lengthened to uniquely identify the desired content.