All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Eric Wong <normalperson@yhbt.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] completion: add --irreversible-delete for format-patch
Date: Mon, 22 Dec 2014 10:39:54 -0800	[thread overview]
Message-ID: <xmqq3887a5qd.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20141221115007.GA23500@dcvr.yhbt.net> (Eric Wong's message of "Sun, 21 Dec 2014 11:50:07 +0000")

Eric Wong <normalperson@yhbt.net> writes:

> Normally I would use "-D", but send-email (which normally passes options
> to format-patch) interprets the "-D" as a case-insensitive abbreviation
> for "--dry-run", preventing format-patch from seeing "-D".

Is this nonstandard option that is designed to produce an
inapplicable patch so widely used to warrant a completion?

I'd actually understand it if this were to complete "git show" and
friends, but not for format-patch.  I'd actually think we might be
better off forbidding its use for the format-patch command (but not
for other commands in the "git log" family), not just at the
completion level but at the command line argument parser level.

Hmph...

> Signed-off-by: Eric Wong <normalperson@yhbt.net>
> ---
>  Case-insensitivity strikes again! :<
>  What a wacky default for Getopt::Long...  And it's probably too late
>  for us to disable case-insensitivity in CLI parsing for send-email.
>
>  contrib/completion/git-completion.bash | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 2fece98..41d8ff8 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -1257,6 +1257,7 @@ __git_format_patch_options="
>  	--not --all --cover-letter --no-prefix --src-prefix= --dst-prefix=
>  	--inline --suffix= --ignore-if-in-upstream --subject-prefix=
>  	--output-directory --reroll-count --to= --quiet --notes
> +	--irreversible-delete
>  "
>  
>  _git_format_patch ()

  reply	other threads:[~2014-12-22 18:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-21 11:50 [PATCH] completion: add --irreversible-delete for format-patch Eric Wong
2014-12-22 18:39 ` Junio C Hamano [this message]
2014-12-22 19:00   ` Eric Wong

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=xmqq3887a5qd.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=normalperson@yhbt.net \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.