mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Askar Safin <safinaskar@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: nroycea+kernel@gmail.com, linux-kernel@vger.kernel.org
Subject: Bug: get_maintainer: Bad divisor in main::vcs_assign: 0
Date: Sun, 22 Feb 2026 19:18:13 +0300	[thread overview]
Message-ID: <20260222161826.2858606-1-safinaskar@gmail.com> (raw)

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

             reply	other threads:[~2026-02-22 16:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-22 16:18 Askar Safin [this message]
2026-02-22 17:25 ` Joe Perches
2026-02-22 22:11   ` Askar Safin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260222161826.2858606-1-safinaskar@gmail.com \
    --to=safinaskar@gmail.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nroycea+kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®