I believe currently they share no code. You might be interested in this thread on the main Git list¹ regarding a prospective "reimplementing" Git on top of libgit2
— with main Git maintainer (Junio C Hamano) chiming in.
In general, you might find these search results² interesting to inspect.
¹ The original link was pointing at GMANE's archive, but it's unfortunately down.
² The link to search results was this.