Fix commit dialog crash when using libgit2 to commit