From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 8B94F41F5CC for ; Thu, 13 Aug 2026 19:05:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786647928; cv=none; b=MYDbvvhgr1vTryl2vLe4VHVr83I0tKQ2rkJm49WMqP9FcXwKraVFfwz6Bg4MUDyMtGdR4/MBqeSnsU0GU7t0ydlJSBM9WQTnLWw2mjNZvGKXeJ4SIQZAw16hpknYUhjOZuMLCD76L2NXqNgOhsUk4vzexxC8RyTTuSAlqSAahCE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786647928; c=relaxed/simple; bh=iHfs42nyhVAuYi3aNlvqKe3qXo7Z0s+c3IPbBF09X8s=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gTFb1ZwaJPk/RCUAMKuG5FbsHxdiNvaoBmUitqeMkSP+jb1H0LFNEwoOQnewCra2OAtjou0qBSe/Ojcj9nQ2dVhs6YWKGm64KE/a3R/aKHPqTiEJemOkZKeRJC+ijpbleueYM2lAR2x+z++9taIolmH4clXnlz80YK2MoYSNCt0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=D2pOi7FV; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="D2pOi7FV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B55F1F00A3A; Thu, 13 Aug 2026 19:05:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786647927; bh=+s9atkH3/yS+H8BUkJ1ySt/ZDylPs9/fH9vbc9kcNGM=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=D2pOi7FVHSi1lGeLzqe2ISKBbfZ4quuU2fbhgtAbW3yVSdO/p8UbWFnzQ9gy/PMeS XfWNUL6XclI81y1foVtF3WoQdmheyvnnhk9tiQVtEnnOumnXnWbOBtYkPnBbSJq5Id EltYjlv4uuXtb7jqwu522fwoIT8MFBuznWGPtJ0Qil55wPrA+MOYaV9fJO+naCgMGi 3XsW1hCMRl2d+BgVW5DOvuNs5CfPvKVa2C8KKb0QU8Ldtkl+aaKV5Y4gk4wCcPXQH0 F0tdUSg5CcXBv28x2L2n4BWTUWcF8Izm/ghN7xLgX4zwXcy8r0S0WLvc3EcJ1h7Zq1 kbnAC5QmrJ5rA== From: Vincent Mailhol Date: Thu, 13 Aug 2026 21:05:02 +0200 Subject: [PATCH v3 1/4] completion: add 'git history' subcommands Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260813-history_autocompletion-v3-1-69eed1cea93a@kernel.org> References: <20260813-history_autocompletion-v3-0-69eed1cea93a@kernel.org> In-Reply-To: <20260813-history_autocompletion-v3-0-69eed1cea93a@kernel.org> To: git@vger.kernel.org Cc: Junio C Hamano , Philippe Blain , Patrick Steinhardt , Ben Knoble , Vincent Mailhol X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3602; i=mailhol@kernel.org; h=from:subject:message-id; bh=iHfs42nyhVAuYi3aNlvqKe3qXo7Z0s+c3IPbBF09X8s=; b=owGbwMvMwCV2McXO4Xp97WbG02pJDFl1okWsE1hVUySO2k9pKXlaeDnicN6VI+smzZ3EXTnnx MlPbAJ/OiayMIhxMViKKbIsK+fkVugo9A479NcSZg4rE8gQaZEGBiBgYeDLTcwrNdIx0jPVNtQz BDJ0jBi4OAVgqjc9YvhnI853+nVn3mT/jN8PjjPNuCI6oUNvwQmXFfxbZ+2ZHyd+g5Hh1eUpbbm L5uz+tOHydkG7G7d6uvw0Di99Z+J70+eUp7wLPwA= X-Developer-Key: i=mailhol@kernel.org; a=openpgp; fpr=ED8F700574E67F20E574E8E2AB5FEB886DBB99C2 Use the parse-options completion helpers for the git history subcommands and their options. All current history subcommands take a revision as their first positional argument, so complete that argument as a revision. Once the revision is present, leave any further positional arguments to subcommand-specific completion. This allows a subcommand to complete another kind of argument, such as the pathspec accepted by git history split or another revision if a future subcommand accepts one. Signed-off-by: Vincent Mailhol --- Changes in v3: - Ignore the split "