(the subject is my preliminary speculation)
Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your
issue. What did you do before the bug happened? (Steps to reproduce your
issue)``` git shortlog -n --not-an-option master ```
Note that you need a real option like `-n` before the `--not-an-option`. Or else it will work correctly.
What did you expect to happen? (Expected behavior)
This error:
``` error: unknown option `--not-an-option' [usage printout] ```
What happened instead? (Actual behavior)
This error:
``` error: unknown option `(null)' [usage printout] ```
What's different between what you expected and what actually
happened?I expected it to print the option in quotes. Instead it printed `(null)` which I think is the placeholder for when the `%s` arg is `NULL`.
Anything else you want to add:
I have tested and reproduced on:
• master: 0f8e75ab (Revert "Merge branch 'en/no-amend-during-conflicts'", 2026-09-23) • seen: e844e042 (Merge branch 'je/doc-merge-conflicts' into seen, 2026-09-24) • next: d58861e6 (Revert "Merge branch 'gg/http-ssl-verify-status' into next", 2026-09-23)
I have bisected this to cd439487 (revision: manage memory ownership of argv in setup_revisions(), 2025-09-19).
Note that the recent topic jk/rev-info-argv-to-free fixes issues caused by commit cd439487, but that topic does not change how this option handling behaves; the topic is part of `master` now which I tested. I also tested on top of the topic and got the same `(null)' result.
Please review the rest of the bug report below.
You can delete any lines you don't wish to share.[System Info] git version: git version 2.55.0.793.gc667de3f2c5 cpu: x86_64 built from commit: c667de3f2c5e43830a8dfaa79a27d5d1f106f0ab sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh rust: enabled feature: fsmonitor--daemon gettext: enabled libcurl: 7.81.0 OpenSSL: OpenSSL 3.0.2 15 Mar 2022 zlib: 1.2.11 SHA-1: SHA1_DC SHA-256: SHA256_BLK default-ref-format: files default-hash: sha1 uname: Linux 6.8.0-138-generic #138~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 7 13:43:15 UTC x86_64 compiler info: gnuc: 11.4 libc info: glibc: 2.35 $SHELL (typically, interactive shell): /bin/bash
[Enabled Hooks] commit-msg post-applypatch post-checkout post-commit sendemail-validate
-- Kristoffer Haugsbakk kristofferhaugsbakk@fastmail.com