From patchwork Wed Jun 14 12:18:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13279988 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5853EB64DB for ; Wed, 14 Jun 2023 12:18:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243614AbjFNMSp (ORCPT ); Wed, 14 Jun 2023 08:18:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236276AbjFNMSn (ORCPT ); Wed, 14 Jun 2023 08:18:43 -0400 Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F8F81FD6 for ; Wed, 14 Jun 2023 05:18:39 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id E5C0032009AC for ; Wed, 14 Jun 2023 08:18:35 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 14 Jun 2023 08:18:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc :content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm2; t=1686745115; x=1686831515; bh=Gne67QcL/lk3HKB6AggUU/Ide WrelXXj/aiafdRCtcY=; b=na/qY9voYT/rTXoM+1xxrCaouO6+IdJAOAk+Gbev+ htD/ltkCNxdj9Tba3AP6vp7lidlgYRM39r5+z3Gmx9/BhRotNB8WNjPj+JwfU17V +zIV5hqNOTfVkDPxIeUy2765BAUdAO5PFMXn2JcNITwItAMuvSM4jVUCaYb24HJN n6ilwoXQHgSVV9+W9UUHl4uQDJGbDRzairvOlKuGzKx5AMMh+DUyT1UFz4m4UHo5 krff7wehh8oHTDBbei8z8H2o3uZJTboN4pPlHj7yn8e6q826fIC1fIqY+anm5lp7 5/JPqddsJXd98iXU0ynv2+F51VP7SSI+X826yrAu/xuKg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1686745115; x=1686831515; bh=Gne67QcL/lk3HKB6AggUU/IdeWrelXXj/ai afdRCtcY=; b=YvPzBnigwk1l6101zvvzdayfJz7dtG4k2+NmYdVCI/HfQN4fGwq lJ0YmZpc8mZsNEV++PssHXdMbLoW3dWziI+WdKgSEh7CaQOjGruAvlJNYHyhNfIF mxe9qDek9RmN4WSdJrYYGcM9FV8ROd0VXmkKFV7RrcQYWEMGo2kPaxm6iBGxALkY qgXMZTTMhxKwllXhWcuEJbwfC+0DpyX/dXugmN7dlSeBNtO2btumuSY2ZebjqTFT 5l+8PCFAuRnLdGdS7kJNcUWhBqIJ+dJt5GMaWgi3Tk/h5E8P5Ve5+lgComK9tltS dBtYRd99nGKyynyQm99rIh3Ap8b8YCcluqQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedvtddgheduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkgggtugesghdtreertd dtvdenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhs rdhimheqnecuggftrfgrthhtvghrnhepjeeifedvueelfffgjeduffdvgefhiefgjefgvd dvfeduvefffeevfffhgfekieffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghm pehmrghilhhfrhhomhepphhssehpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Wed, 14 Jun 2023 08:18:34 -0400 (EDT) Received: by pks.im (OpenSMTPD) with ESMTPSA id 865175ae (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Wed, 14 Jun 2023 12:18:27 +0000 (UTC) Date: Wed, 14 Jun 2023 14:18:28 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Subject: [PATCH 0/3] revision: handle pseudo-opts in `--stdin` mode Message-ID: MIME-Version: 1.0 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi, both git-rev-list(1) and git-log(1) provide a `--stdin` mode that will cause these commands to read additional commits from standard input. The primary usecase will typically be scripts that potentially process a long list of commits which might otherwise bust command line length limits. One notable omission though is that this mode does not allow us to pass pseudo-options like `--all`, `--branch`, `--glob=` or `--not`. And while it is possible to mix command line arguments and `--stdin` in order to mix both pseudo-options and a potentially large set of commits, the end result is arguably more complex for the user. This patch series thus implements support for handling pseudo-options in `--stdin` mode for both git-rev-list(1) and git-log(1). Patrick Patrick Steinhardt (3): revision: reorder `read_revisions_from_stdin()` revision: small readability improvement for reading from stdin revision: handle pseudo-opts in `--stdin` mode Documentation/rev-list-options.txt | 9 ++-- revision.c | 76 +++++++++++++++++------------- t/t6017-rev-list-stdin.sh | 32 +++++++++++++ 3 files changed, 79 insertions(+), 38 deletions(-)