simplify the _getShaStringForData() method

@gaurave, this simplifies the logic for the `getShaForEntry` / `getShaForString` / `getShaForData` methods. The tests pass, and I'm able to run git operations.