From: "SZEDER Gábor" <szeder.dev@gmail.com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org, Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH] completion: use __gitcomp_builtin for format-patch
Date: Mon, 22 Oct 2018 12:17:19 +0200 [thread overview]
Message-ID: <20181022101719.GE30222@szeder.dev> (raw)
In-Reply-To: <20181021084102.8318-1-pclouds@gmail.com>
On Sun, Oct 21, 2018 at 10:41:02AM +0200, Nguyễn Thái Ngọc Duy wrote:
> This helps format-patch gain completion for a couple new options,
> notably --range-diff.
>
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
> Of course it will be even better if I could complete the ref for
> --range-diff=, but maybe another day.
>
> contrib/completion/git-completion.bash | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index c8fdcf8644..065b922777 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -1533,12 +1533,8 @@ _git_fetch ()
> }
>
> __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
> + --full-index --not --all --no-prefix --src-prefix=
> + --dst-prefix= --notes
> "
$__git_format_patch_options is also used when completing 'git
send-email's options, thus removing all these options will badly
affect that, and in fact makes 't9902-completion.sh' fail with:
expecting success:
test_completion "git send-email --cov" "--cover-letter " &&
test_completion "git send-email ma" "master "
--- expected 2018-10-22 09:03:42.255325418 +0000
+++ out_sorted 2018-10-22 09:03:42.255325418 +0000
@@ -1 +1 @@
---cover-letter
+
not ok 122 - send-email
#
# test_completion "git send-email --cov" "--cover-letter " &&
# test_completion "git send-email ma" "master "
#
> _git_format_patch ()
> @@ -1551,7 +1547,7 @@ _git_format_patch ()
> return
> ;;
> --*)
> - __gitcomp "$__git_format_patch_options"
> + __gitcomp_builtin format-patch "$__git_format_patch_options"
You sent out a separate bugfix patch (i.e. not a patch series)
"completion: fix __gitcomp_builtin no longer consider extra options"
in:
https://public-inbox.org/git/20181021083731.8009-1-pclouds@gmail.com/
and this patch makes the completion of 'git format-patch' also use
extra options... So, does this patch really work without that bugfix?
> return
> ;;
> esac
> --
> 2.19.1.647.g708186aaf9
>
next prev parent reply other threads:[~2018-10-22 10:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-21 8:41 [PATCH] completion: use __gitcomp_builtin for format-patch Nguyễn Thái Ngọc Duy
2018-10-22 10:17 ` SZEDER Gábor [this message]
2018-10-22 14:25 ` Duy Nguyen
2018-10-22 12:12 ` Johannes Schindelin
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181022101719.GE30222@szeder.dev \
--to=szeder.dev@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.com \
--cc=sunshine@sunshineco.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).