small improvements to code for working with fetched merges

Great suggestion! :+1:

I've made some small changes to your code (see https://coderwall.com/p/_8dxjw for some more info). If you're okay with these changes, feel free to merge them into your pull request, and give me a shout :). Otherwise just let me know what you disagree with.