Fix for merge.go:169 cherry-picked from github.com/demdxx/git2go