I think using emscripten + some customization of the code is much more efficient than doing this port AND you don't have problems with incompatibilities.
But why do you want to run git in your web browser in the first place?
I think this is what emscripten is for: You have some _great_ code and want to port it to the browser platform. But I'm afraid Git relies heavily on the "Posix runtime" that is not supported by emscripten, since emscripten does not try to emulate an os.