git-apply: actually apply patches and update the index