Sd - a peer to peer bugtracker I actually like 17 years ago
Your insight is a reasonable one -- and it's where we started when we were designing SD. It quickly became apparent to us that there's a subtle but serious impedance mismatch.
It turns out that the way you want to handle merging of databases is different than how you want to handle merging of codebases.
On top of that, the obvious advantage of storing your bugs in your VCS is "branching bugs" -- unfortunately, that turns out to hurt really badly once you want to start asking questions about "what bugs are open?" and "has bug xyz been fixed."
Besides, we have a bunch of other p2p database apps we want to build that aren't sourcecode related ;)