All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Denton Liu <liu.denton@gmail.com>
Cc: "SZEDER Gábor" <szeder.dev@gmail.com>,
	"Eric Sunshine" <sunshine@sunshineco.com>,
	"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
	git@vger.kernel.org, anmolmago@gmail.com, briankyho@gmail.com,
	david.lu97@outlook.com, shirui.wang@hotmail.com
Subject: Re: [PATCH v2] completion: use builtin completion for format-patch
Date: Tue, 30 Oct 2018 16:33:20 +0900	[thread overview]
Message-ID: <xmqqo9bb28jj.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <72331ce9275ce995009fe8dd3d586bb9d71f2cbf.1540881141.git.liu.denton@gmail.com> (Denton Liu's message of "Tue, 30 Oct 2018 02:38:00 -0400")

Denton Liu <liu.denton@gmail.com> writes:

> This patch offloads completion functionality for format-patch to
> __gitcomp_builtin. In addition to this, send-email was borrowing some
> completion options from format-patch so those options are moved into
> send-email's completions.
>
> Signed-off-by: Denton Liu <liu.denton@gmail.com>
> ---
>
> I ran t9902-completion.sh on this patch and it seems to pass. Thus, this
> should address the concerns about losing some completion options in
> send-email.

Thanks.  I added those who were involved in the review thread of the
original patch last week to CC.  Let's see how well this round is
received.

> ---
>  contrib/completion/git-completion.bash | 34 +++++++++++---------------
>  1 file changed, 14 insertions(+), 20 deletions(-)
>
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index d63d2dffd..cb4ef6723 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -1531,15 +1531,6 @@ _git_fetch ()
>  	__git_complete_remote_or_refspec
>  }
>  
> -__git_format_patch_options="
> -	--stdout --attach --no-attach --thread --thread= --no-thread
> -	--numbered --start-number --numbered-files --keep-subject --signoff
> -	--signature --no-signature --in-reply-to= --cc= --full-index --binary
> -	--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
> -"
> -
>  _git_format_patch ()
>  {
>  	case "$cur" in
> @@ -1550,7 +1541,7 @@ _git_format_patch ()
>  		return
>  		;;
>  	--*)
> -		__gitcomp "$__git_format_patch_options"
> +		__gitcomp_builtin format-patch
>  		return
>  		;;
>  	esac
> @@ -2080,16 +2071,19 @@ _git_send_email ()
>  		return
>  		;;
>  	--*)
> -		__gitcomp "--annotate --bcc --cc --cc-cmd --chain-reply-to
> -			--compose --confirm= --dry-run --envelope-sender
> -			--from --identity
> -			--in-reply-to --no-chain-reply-to --no-signed-off-by-cc
> -			--no-suppress-from --no-thread --quiet --reply-to
> -			--signed-off-by-cc --smtp-pass --smtp-server
> -			--smtp-server-port --smtp-encryption= --smtp-user
> -			--subject --suppress-cc= --suppress-from --thread --to
> -			--validate --no-validate
> -			$__git_format_patch_options"
> +		__gitcomp "--all --annotate --attach --bcc --binary --cc --cc= --cc-cmd
> +			--chain-reply-to --compose --confirm= --cover-letter --dry-run
> +			--dst-prefix= --envelope-sender --from --full-index --identity
> +			--ignore-if-in-upstream --inline --in-reply-to --in-reply-to=
> +			--keep-subject --no-attach --no-chain-reply-to --no-prefix
> +			--no-signature --no-signed-off-by-cc --no-suppress-from --not --notes
> +			--no-thread --no-validate --numbered --numbered-files
> +			--output-directory --quiet --reply-to --reroll-count --signature
> +			--signed-off-by-cc --signoff --smtp-encryption= --smtp-pass
> +			--smtp-server --smtp-server-port --smtp-user --src-prefix=
> +			--start-number --stdout --subject --subject-prefix= --suffix=
> +			--suppress-cc= --suppress-from --thread --thread= --to --to=
> +			--validate"
>  		return
>  		;;
>  	esac

  reply	other threads:[~2018-10-30  7:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-29 17:57 [PATCH] completion: use builtin completion for format-patch Denton Liu
2018-10-30  2:20 ` Junio C Hamano
2018-10-30  3:50   ` Denton Liu
2018-10-30  6:38   ` [PATCH v2] " Denton Liu
2018-10-30  7:33     ` Junio C Hamano [this message]
2018-10-30 15:29     ` Duy Nguyen
2018-11-01  1:42       ` Junio C Hamano
2018-11-01 15:40         ` Duy Nguyen
2018-11-01 23:52           ` Junio C Hamano
2018-11-03  6:03             ` Duy Nguyen
2018-11-03  7:59               ` Denton Liu
2018-11-03  8:29                 ` Duy Nguyen
2018-11-03 10:20                   ` Junio C Hamano

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=xmqqo9bb28jj.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=anmolmago@gmail.com \
    --cc=briankyho@gmail.com \
    --cc=david.lu97@outlook.com \
    --cc=git@vger.kernel.org \
    --cc=liu.denton@gmail.com \
    --cc=pclouds@gmail.com \
    --cc=shirui.wang@hotmail.com \
    --cc=sunshine@sunshineco.com \
    --cc=szeder.dev@gmail.com \
    /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.