From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16961 invoked from network); 27 Aug 2020 16:51:25 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 27 Aug 2020 16:51:25 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-ID:Date:Content-ID: Content-Type:MIME-Version:Subject:To:References:From:In-reply-to:cc:Reply-To: Content-Transfer-Encoding:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=L3eHLFW+EPO4GZ8ylZNYjPwJ/lisW85nM4Uk5VCvVIY=; b=jvEBvYQg7VVfd2HkTqOpMQ/qSs DVHBMDDO8WgyKZTLSLkqU+t/mZx5PZp7/n0KSVzgVR0R/HVZgWnQUCrSN36Au4mIsbP2Pwz17d4KL SCpltqty0rvYdmD41w62uXPPwyN41oUQTZkt52oer1LVDYvOh91faCbsHpNcVehnnEC9tD1AC2zhU UVqtwzF6WkG4wrAKenh6NofrYPya/8F1353wTY8UZ9H2IKyZb99nvgG/d7Ul9tkv3eNxgkwKdvfwK cJdNo8HpTNXArStM2RcXgI9SlLxpbMkxEghzayfXqtz+5HQqx9cxE3KHVacLRGjYbFvUeE/kzYdwm QxWGM3+A==; Received: from authenticated user by zero.zsh.org with local id 1kBL7T-000DHM-KN; Thu, 27 Aug 2020 16:51:23 +0000 Received: from authenticated user by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1kBL7E-000D8y-Gw; Thu, 27 Aug 2020 16:51:08 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.93.0.4) (envelope-from ) id 1kBL7D-0006uI-4F; Thu, 27 Aug 2020 18:51:07 +0200 cc: "zsh-workers@zsh.org" In-reply-to: <157c404c1df34a08b4de5627a1a237ff@ub.uni-frankfurt.de> From: Oliver Kiddle References: <157c404c1df34a08b4de5627a1a237ff@ub.uni-frankfurt.de> To: "Heinrich, Jens" Subject: Re: PATCH: 5.8: add information to git-clean completion MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <26552.1598547067.1@hydra> Date: Thu, 27 Aug 2020 18:51:07 +0200 Message-ID: <26553-1598547067.054970@ssWS.aY8a.gI7l> X-Seq: 47340 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: "Heinrich, Jens" wrote: > Is this ok? > If not: What should I change? > this is needed to remove nested repositories > +++ b/Completion/Unix/Command/_git > '(-f --force)'{-f,--force}'[required when clean.requireForce is true (default)]' \ > + '(-f --force)'{-f,--force}'[required twice to remove nested git repositories]' \ As a minimum, the exclusion list can't remain. This is the '(-f --force)' part at the beginning which says that those two options are mutually exclusive. If the option can be repeated we need to put \* in instead to allow that. Going further, it depends how much effort you want to go to. It could check whether -f has already been specified on the command-line and adjust the description accordingly. And perhaps it could even check the state of clean.requireForce. I don't think the new description is ideal because it loses the indication of what a single use of the option does. If you don't want to add clever logic to alter the description, then we need to squash both descriptions together as tersely as possible. When shortening descriptions also keep in mind that truncation removes what comes at the end so you want important words first. Perhaps something like: \*{-f,--force}'[required unless clean.requireForce is false; repeat to clean nested repositories]' That's still longer than is ideal. What exactly does the repeated use of -f do? Is it removing nested repositories or doing a clean in them. From my cursory testing, nested repositories seem to be ignored no-matter what arguments I give. Is it perhaps only submodules that it does anything with. If so, "submodules" is shorter than "nested repositories". Thanks Oliver