From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-a1-smtp.messagingengine.com (fhigh-a1-smtp.messagingengine.com [103.168.172.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 147DF4F052A for ; Fri, 25 Sep 2026 22:23:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.152 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790375005; cv=none; b=JspXxN4LHCAwsgyV8bpNaTBIfLyOZTaex3M8dAhzm1cOh3aqqFiF4LgSkwYBp5+PjmDZh9mm9y/5ijodNFmGW6nB6zU9QBKkkvCRuiPtsU05/97GX9wFF+t+RvaMTRvA9L3Xwfxh3amigB6lqiqRD+Hhyd3ceh5vfNBSIv/Xfug= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790375005; c=relaxed/simple; bh=SjmypiE6wGfhe9+ZqoUBUQOC4cQUCg0p0Qux0PpIArg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=aPHBtCIKGS8zv8N4MPhbPiK5qJ6zsmY7085f1vkSHzWpKDTE2HjJPlaumly06/3ve0XsCvOM6F3XxOmE1ewBoa0HrIpnRnpCWFOfcI/PiWlGWs3NkNfx0VF09pGCvYD24e53rd95mYuJmFsYXEAOGSteoHpI5enHU8RyV+qNxfU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b=UKRuSHPa; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=ljttjm/x; arc=none smtp.client-ip=103.168.172.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="UKRuSHPa"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="ljttjm/x" Received: from phl-compute-08.internal (phl-compute-08.internal [10.202.2.48]) by mailfhigh.phl.internal (Postfix) with ESMTP id E5E2F14000B5; Fri, 25 Sep 2026 18:23:22 -0400 (EDT) Received: from phl-frontend-02 ([10.202.2.161]) by phl-compute-08.internal (MEProxy); Fri, 25 Sep 2026 18:23:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1790375002; x=1790461402; bh=nfVO1tofox HbYBe/wZglOt9D3YoctMZbOw4Scuganvs=; b=UKRuSHPa6+Jce4LErP2rubojXh 8fCYm4JwccMIohHYeFVD8Mxx3U20nTyZmEcnwUKpes4OZ+PNIpgwZwDHJ8SsJvdk RmwvwRhoqJ0OM+yTQjhj20SJZ/LiuJuwnRMP1c6/q85Yl62TmAaRQqzHAVFekPWf NM6DWv48W4kwQYCFdg07LOqJ/R2pRkQIBxyuVWU/qUeGOefZWnasXpp3MAZ2kOQh e/FladW4ZtFt92yI54SDTQrqlTvl6rwpPdgn7fNE+C9nDdycX0nMgovQshRSn4wP T+ktjvzQI+7/CVIt/woVO0Sdb1LJrIlQRRJ3X1fGZ7bsXpO39Y4qMn5rb8HA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1790375002; x=1790461402; bh=nfVO1tofoxHbYB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BG/CHWSlVfDErkXgPLmvPsEXCcjLQ X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 25 Sep 2026 18:23:22 -0400 (EDT) From: Junio C Hamano To: Jeff King Cc: Kristoffer Haugsbakk , git@vger.kernel.org Subject: Re: [PATCH 0/2] some parse_revision_opt() bugfixes In-Reply-To: <20260925203359.GA1506705@coredump.intra.peff.net> (Jeff King's message of "Fri, 25 Sep 2026 16:33:59 -0400") References: <74796901-ffb1-4cf3-bd63-7294328f70bc@app.fastmail.com> <20260925082636.GA1493716@coredump.intra.peff.net> <20260925203359.GA1506705@coredump.intra.peff.net> Date: Fri, 25 Sep 2026 15:23:20 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Jeff King 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'