From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id C39C620964 for ; Thu, 23 Mar 2017 17:29:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935316AbdCWR3o (ORCPT ); Thu, 23 Mar 2017 13:29:44 -0400 Received: from pb-smtp1.pobox.com ([64.147.108.70]:54851 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934622AbdCWR3n (ORCPT ); Thu, 23 Mar 2017 13:29:43 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 6F6938AF5F; Thu, 23 Mar 2017 13:29:41 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=yAvQHRg8nVto yyC4gnrqxS7izwY=; b=ucZ2Nuq3hQw+BBJ9QJPUE0RJQMbRad17/FkN7mUGHmBN PxZrFaoFtWbf4ycr6dQLh8D0j+8dKbnExsY5D/++wC3olQr3KP6wHROOHFmp++/7 NtkobshCcVJexchKFuRn5ZHdiZyygoaW1G532ja0Jd2g9ACf7DjjUsqwtaZwxuc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=sasl; b=VJJQEJ XpBHleDGSppMMJsDpiPwBko22LPHwt4GfrqVCq9XMpcSyB37gjs7h4GgmXnRg4R8 zqEkdz0eOAXHZ1QcHLVbGrlL6LmVS4qgs5QoS7rKrUBPLzQOEZ2Mhacc9YZpiIJE ScecjJWPoUko48uHEbOHVXGZHNQ7ZAOr9hQbA= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 677498AF5E; Thu, 23 Mar 2017 13:29:41 -0400 (EDT) Received: from pobox.com (unknown [104.132.0.95]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id C61BE8AF5C; Thu, 23 Mar 2017 13:29:40 -0400 (EDT) From: Junio C Hamano To: =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason Cc: git@vger.kernel.org, Lars Hjemli , Jeff King , Christian Couder , Carlos Rica , Samuel Tardieu , Tom Grennan , Karthik Nayak Subject: Re: [PATCH v3 12/16] tag: implicitly supply --list given another list-like option References: <20170323130529.11361-1-avarab@gmail.com> <20170323130529.11361-13-avarab@gmail.com> Date: Thu, 23 Mar 2017 10:29:39 -0700 In-Reply-To: <20170323130529.11361-13-avarab@gmail.com> (=?utf-8?B?IsOG?= =?utf-8?B?dmFyIEFybmZqw7Zyw7A=?= Bjarmason"'s message of "Thu, 23 Mar 2017 13:05:25 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Pobox-Relay-ID: 4BF220F6-0FEE-11E7-A501-97B1B46B9B0B-77302942!pb-smtp1.pobox.com Content-Transfer-Encoding: quoted-printable Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org =C3=86var Arnfj=C3=B6r=C3=B0 Bjarmason writes: > diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt > index 2640c6955c..491dba065c 100644 > --- a/Documentation/git-tag.txt > +++ b/Documentation/git-tag.txt > @@ -82,10 +82,11 @@ OPTIONS > =20 > -n:: > specifies how many lines from the annotation, if any, > - are printed when using -l. > - The default is not to print any annotation lines. > - If no number is given to `-n`, only the first line is printed. > - If the tag is not annotated, the commit message is displayed instead. > + are printed when using -l. Implies `--list`. > ++ > +The default is not to print any annotation lines. > +If no number is given to `-n`, only the first line is printed. > +If the tag is not annotated, the commit message is displayed instead. I thought we would want to have -n thing separate as we are much less sure than the others, but let's forget about that and commit to default to -l with -n. Given the confusion I had during the review of the previous round, I would think this should clarify what it means "If no number is given to -n" a bit more strongly. Namely, the behaviour we see in this test: > +test_expect_success 'The -n 100 invocation means -n --list 100, not -n= 100' ' can be a common mistake and needs to be warned about. I'd drop "The default is not to print any annotation lines". It is not just unnecessary (we make a specific mention about the default when we act as if an option were given even if the user doesn't explicitly give it, and not triggering a special feature when it is not asked for _is_ the default everywhere else), but is confusing, because it is unclear if it is talking about the default case of not giving any -n option, or the default case of not giving but still the -n option. Perhaps something along the lines of ... -n:: Show the message of the annotated tag when using the `--list` mode. A number can be directly attached to the `-n` option (e.g. `-n100`; not `-n 100` as separate arguments) to specify how many lines of the message to show. Without , only the first line of the message is shown. For an unannotated tag that points at a commit, the commit message is used instead. ... may be less confusing? > @@ -1496,7 +1517,6 @@ test_expect_success 'mixing incompatibles modes a= nd options is forbidden' ' > test_must_fail git tag -l -v && > test_must_fail git tag -l -d && > test_must_fail git tag -l -v -d && > - test_must_fail git tag -n 100 && Hmph, wouldn't we want to instead replace it with ... something to set expectation ... >expect && git tag -n 100 >actual && test_cmp expect actual && here? > test_must_fail git tag -n 100 -v && > test_must_fail git tag -l -m msg && > test_must_fail git tag -l -F some file && Thanks.