All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH 0/2] some parse_revision_opt() bugfixes
Date: Fri, 25 Sep 2026 15:23:20 -0700	[thread overview]
Message-ID: <xmqqbj9lt1gn.fsf@gitster.g> (raw)
In-Reply-To: <20260925203359.GA1506705@coredump.intra.peff.net> (Jeff King's message of "Fri, 25 Sep 2026 16:33:59 -0400")

Jeff King <peff@peff.net> writes:

> On Fri, Sep 25, 2026 at 04:26:36AM -0400, Jeff King wrote:
>
>> > I have bisected this to cd439487 (revision: manage memory ownership of
>> > argv in setup_revisions(), 2025-09-19).
>> 
>> Yep, definitely my fault. I don't have time to do a full write-up now,
>> but the most direct solution is:
>> [...]
>> But I think instead doing this:
>
> I ended up reversing my decision there, for reasons that are explained
> in the second commit. But the good news is that doing so also revealed a
> related bug that predates even cd439487.
>
> So here are the fixes. I apologize in advance for the length of the
> second commit message. At least I feel good about my decision to go to
> bed before writing it. ;)
>
>   [1/2]: revision: avoid reporting known options as unknown on error
>   [2/2]: revision: handle argv movement in parse_revision_opt()
>
>  revision.c          |  7 +++++--
>  t/t4201-shortlog.sh | 11 +++++++++++
>  2 files changed, 16 insertions(+), 2 deletions(-)

Both patches make sense.

: git; rungit v2.52.0 shortlog -n --no-such-option 2>&1 | head -n1
error: unknown option `(null)'
: git; rungit v2.51.0 shortlog -n --no-such-option 2>&1 | head -n1
error: unknown option `--no-such-option'
: git; ./git shortlog -n --no-such-option 2>&1 | head -n1
error: unknown option `--no-such-option'


      parent reply	other threads:[~2026-09-25 22:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-25  0:28 [BUG] revision: premature free-and-null causes “unknown option `(null)`” Kristoffer Haugsbakk
2026-09-25  8:26 ` Jeff King
2026-09-25 20:33   ` [PATCH 0/2] some parse_revision_opt() bugfixes Jeff King
2026-09-25 20:35     ` [PATCH 1/2] revision: avoid reporting known options as unknown on error Jeff King
2026-09-25 20:39     ` [PATCH 2/2] revision: handle argv movement in parse_revision_opt() Jeff King
2026-09-26  9:00       ` Kristoffer Haugsbakk
2026-09-28  3:25         ` Jeff King
2026-09-29  7:43           ` Kristoffer Haugsbakk
2026-09-25 22:23     ` Junio C Hamano [this message]

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=xmqqbj9lt1gn.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=kristofferhaugsbakk@fastmail.com \
    --cc=peff@peff.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.