The commit code path reads branchheads just to show whether the new commit
is creating a new head or not.
439 | _docommit commands.py:1505 111 \ branchheads localrepo.py:2169 109 | branchmap localrepo.py:953 109 | _branchmapupdatecache perftweaks.py:146 109 | closure extensions.py:343 109 | _branchmapupdate perftweaks.py:107
Disabling the branch calculation saves about 100ms during commit in a large
repo.
Maybe comment that branchheads is called *before* the commit, and therefore '.' here is the old working copy parent, and that the result of this function is used to test if the old parent was already a head and if the new commit wasn't a head already.