From patchwork Tue Oct 24 13:11:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13434445 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 2AB372AB35 for ; Tue, 24 Oct 2023 13:11:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="FvHxRJcd"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Zv1Otd3p" Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B67DED7D for ; Tue, 24 Oct 2023 06:11:24 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id D43D032009F6; Tue, 24 Oct 2023 09:11:23 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 24 Oct 2023 09:11:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1698153083; x=1698239483; bh=3a PQPejqIhi+4oQbY3rbLJ+Z4+YNu+SSxjN3/d6f7/4=; b=FvHxRJcdBpiRh9rl8z QSiteKZa/jxaktxBxGQKOzQ5ov50ehkhmQRmEyCnr1v7u2ICgwqSAPB8CNEFhcfe bsOmdikjbQ5o0Ru5Hr4jC59Rk4gJ7chr3ZSao8Ol4D3PjG+3W7Dv01It4NiiTI7H kuEiLYsj3M3jGf32RyPByl0nWVHLgbDeaX4LK1BW44EYbCFeKqGyETl5nbC/UNKT V2wyzdHRWZ/T4R/SVJmExZAcV0KDfm2j0MM+cjDCCGAHlY8yrgmod8xU/Jf0A3Uo MWiH6Je2L5eD0lIQLnlFNHU7VcpFP+nRTig2V9O7eI2CeTKp8NOFYIPco9qLeMna OIqw== 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:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1698153083; x=1698239483; bh=3aPQPejqIhi+4 oQbY3rbLJ+Z4+YNu+SSxjN3/d6f7/4=; b=Zv1Otd3pnoF9Mmz+ZdgsG2ja7PuJ/ 3PqRo3Hn1wEdye8Z6esKoPUiR1rDmJQK2TFnI6WE73XciQCAsypaJgXJJYBKec/q aUB6W/nWQex6ORMDe4PpAujkdNuPbEHXlTXcrWH9XUtYkrHFvNvDY0jBLwbPLlJ9 Tb7drJUBvOttkfwbuRlkWebWlTCdYUwGrlAA3mmcZ7EUT52KQWSswx8OyaoPg5Dc rxXCbyUwiG74ghTMBD51KK/u+DkMVDWAJ0JoIhP7Tmr3rM/HQH2XsT7FovYZsguf 6Qx0ZidF3skHMZHKcycySR2bJj3d5BwZDr13vvp2tBZZDNOwg2taR/IIA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrkeekgdeitdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrghtrhhi tghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtthgvrh hnpeeukedtvedtffevleejtefgheehieegkeeluddvfeefgeehgfeltddtheejleffteen ucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehpshesph hkshdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 24 Oct 2023 09:11:22 -0400 (EDT) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 232ddd98 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 24 Oct 2023 13:11:17 +0000 (UTC) Date: Tue, 24 Oct 2023 15:11:20 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Junio C Hamano , Eric Sunshine , Han-Wen Nienhuys Subject: [PATCH 10/12] builtin/show-ref: explicitly spell out different modes in synopsis Message-ID: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: The synopsis treats the `--verify` and the implicit mode the same. They are slightly different though: - They accept different sets of flags. - The implicit mode accepts patterns while the `--verify` mode accepts references. Split up the synopsis for these two modes such that we can disambiguate those differences. Signed-off-by: Patrick Steinhardt --- Documentation/git-show-ref.txt | 5 ++++- builtin/show-ref.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt index 2fe274b8faa..ab23e0b62e1 100644 --- a/Documentation/git-show-ref.txt +++ b/Documentation/git-show-ref.txt @@ -8,9 +8,12 @@ git-show-ref - List references in a local repository SYNOPSIS -------- [verse] -'git show-ref' [-q | --quiet] [--verify] [--head] [-d | --dereference] +'git show-ref' [-q | --quiet] [--head] [-d | --dereference] [-s | --hash[=]] [--abbrev[=]] [--tags] [--heads] [--] [...] +'git show-ref' --verify [-q | --quiet] [-d | --dereference] + [-s | --hash[=]] [--abbrev[=]] + [--] [...] 'git show-ref' --exclude-existing[=] DESCRIPTION diff --git a/builtin/show-ref.c b/builtin/show-ref.c index 10d0213e687..d0a32d07404 100644 --- a/builtin/show-ref.c +++ b/builtin/show-ref.c @@ -11,9 +11,12 @@ #include "parse-options.h" static const char * const show_ref_usage[] = { - N_("git show-ref [-q | --quiet] [--verify] [--head] [-d | --dereference]\n" + N_("git show-ref [-q | --quiet] [--head] [-d | --dereference]\n" " [-s | --hash[=]] [--abbrev[=]] [--tags]\n" " [--heads] [--] [...]"), + N_("git show-ref --verify [-q | --quiet] [-d | --dereference]\n" + " [-s | --hash[=]] [--abbrev[=]]\n" + " [--] [...]"), N_("git show-ref --exclude-existing[=]"), NULL };