Hmm, that *would* be nice. It'd take an extension of the current libgit2 api, though. Can we add that as an overload later?

Speaking of overloads, would it be desirable to pass in a UTF-8 `byte[]`? Not all editors will have the text in UTF-16 in memory.