Bug: get_maintainer: Bad divisor in main::vcs_assign: 0

From: Askar Safin

Date: Sun Feb 22 2026 - 11:18:49 EST


Hi. I found a bug in get_maintainer.pl: it sometimes shows message
"Bad divisor in main::vcs_assign: 0". Here are exact steps to
reproduce:

==== begin ====
(steps are based on https://stackoverflow.com/a/3489576 )
(these steps create Linux repo, which has exactly one commit: a95f71ad3e2e224277508e006580c333d0a5fe36)

d-user@comp:/tmp$ mkdir linux
d-user@comp:/tmp$ cd linux
d-user@comp:/tmp/linux$ git init --initial-branch=master
Initialized empty Git repository in /tmp/linux/.git/
d-user@comp:/tmp/linux$ git remote add origin https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
d-user@comp:/tmp/linux$ git fetch origin --depth=1 a95f71ad3e2e224277508e006580c333d0a5fe36
remote: Enumerating objects: 98477, done.
remote: Counting objects: 100% (98477/98477), done.
remote: Compressing objects: 100% (95769/95769), done.
Receiving objects: 100% (98477/98477), 272.08 MiB | 5.00 MiB/s, done.
remote: Total 98477 (delta 7730), reused 21396 (delta 1658), pack-reused 0 (from 0)
Resolving deltas: 100% (7730/7730), done.
>From https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
* branch a95f71ad3e2e224277508e006580c333d0a5fe36 -> FETCH_HEAD
d-user@comp:/tmp/linux$ git reset --hard FETCH_HEAD
Updating files: 100% (92984/92984), done.
HEAD is now at a95f71ad3 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux
d-user@comp:/tmp/linux$ scripts/get_maintainer.pl -f Documentation/driver-api/early-userspace/early_userspace_support.rst
Bad divisor in main::vcs_assign: 0
Jonathan Corbet <corbet@xxxxxxx> (maintainer:DOCUMENTATION)
Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx> (reviewer:DOCUMENTATION)
linux-doc@xxxxxxxxxxxxxxx (open list:DOCUMENTATION)
linux-kernel@xxxxxxxxxxxxxxx (open list)

==== end ====

You may say these steps are too complex. Well, let me explain.

Originally I found a bug so: I simply cloned Linux with "depth=1".
HEAD was at a95f71ad3e2e at that moment. Then I typed get_maintainer.pl
command similar to above and got this "Bad divisor" message.
But then HEAD moved, and I was unable to reproduce the bug anymore.

So I came up with these instructions, which recreate my original setup, i. e.
simulate situation "We just did clone with --depth=1, and HEAD is at a95f71ad3e2e".
Steps above create a repo, which has exactly one commit: a95f71ad3e2e.

Also: get_maintainer.pl from current master is identical to get_maintainer.pl
from a95f71ad3e2e, so the problem is still present in current get_maintainer.pl .

--
Askar Safin