zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@zsh.org>
To: "Heinrich, Jens" <J.Heinrich@ub.uni-frankfurt.de>
Cc: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: PATCH: 5.8: add information to git-clean completion
Date: Thu, 27 Aug 2020 18:51:07 +0200	[thread overview]
Message-ID: <26553-1598547067.054970@ssWS.aY8a.gI7l> (raw)
In-Reply-To: <157c404c1df34a08b4de5627a1a237ff@ub.uni-frankfurt.de>

"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


  reply	other threads:[~2020-08-27 16:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-27  9:45 Heinrich, Jens
2020-08-27 16:51 ` Oliver Kiddle [this message]
2020-08-28  2:32   ` Daniel Shahaf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=26553-1598547067.054970@ssWS.aY8a.gI7l \
    --to=opk@zsh.org \
    --cc=J.Heinrich@ub.uni-frankfurt.de \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).