* Bug: get_maintainer: Bad divisor in main::vcs_assign: 0
@ 2026-02-22 16:18 Askar Safin
2026-02-22 17:25 ` Joe Perches
0 siblings, 1 reply; 3+ messages in thread
From: Askar Safin @ 2026-02-22 16:18 UTC (permalink / raw)
To: Joe Perches; +Cc: nroycea+kernel, linux-kernel
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@lwn.net> (maintainer:DOCUMENTATION)
Shuah Khan <skhan@linuxfoundation.org> (reviewer:DOCUMENTATION)
linux-doc@vger.kernel.org (open list:DOCUMENTATION)
linux-kernel@vger.kernel.org (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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Bug: get_maintainer: Bad divisor in main::vcs_assign: 0
2026-02-22 16:18 Bug: get_maintainer: Bad divisor in main::vcs_assign: 0 Askar Safin
@ 2026-02-22 17:25 ` Joe Perches
2026-02-22 22:11 ` Askar Safin
0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2026-02-22 17:25 UTC (permalink / raw)
To: Askar Safin; +Cc: nroycea+kernel, linux-kernel
On Sun, 2026-02-22 at 19:18 +0300, Askar Safin wrote:
> ```
> 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:
It's not really a bug, it's a specific message in get_maintainer
that you don't have depth in your git repository.
If you want to avoid the message, use --nogit --nogit-fallback
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Bug: get_maintainer: Bad divisor in main::vcs_assign: 0
2026-02-22 17:25 ` Joe Perches
@ 2026-02-22 22:11 ` Askar Safin
0 siblings, 0 replies; 3+ messages in thread
From: Askar Safin @ 2026-02-22 22:11 UTC (permalink / raw)
To: Joe Perches; +Cc: nroycea+kernel, linux-kernel
On Sun, Feb 22, 2026 at 8:26 PM Joe Perches <joe@perches.com> wrote:
> On Sun, 2026-02-22 at 19:18 +0300, Askar Safin wrote:
> > 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:
> It's not really a bug, it's a specific message in get_maintainer
> that you don't have depth in your git repository.
>
> If you want to avoid the message, use --nogit --nogit-fallback
Thank you for quick answer.
I think current error message is bad. It looks like bug in script itself.
It should be "your git repo is not full" or something similar.
--
Askar Safin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-02-22 22:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-22 16:18 Bug: get_maintainer: Bad divisor in main::vcs_assign: 0 Askar Safin
2026-02-22 17:25 ` Joe Perches
2026-02-22 22:11 ` Askar Safin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®