Most likely, a lot of https://github.com/msysgit/msysgit/tree/master/share/WinGit can be scavenged to make this happen.