And I really don't like the idea of B. I can easily see people mentioning bugs that are related to a commit in the commit message but not directly fixed by it.
Then why did you invent B only to rail against it? Just use a reasonable pattern, e. g. "This fixes bug #(\d+)."
At my last job, we used 2 different keywords to either associate the patch with the bug, or close the bug. Maybe something like that would work?