Update index before applying try patch with git.
Previous commit was missing unit test changes
Merge dankegel/buildbot-x:update-index-before-git-try-patch (PR #1135)