git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood@talktalk.net>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>, git@vger.kernel.org
Cc: avarab@gmail.com, gitster@pobox.com, sunshine@sunshineco.com,
	szeder.dev@gmail.com
Subject: Re: [PATCH 1/2] completion: don't set PARSE_OPT_NOCOMPLETE on --rerere-autoupdate
Date: Tue, 6 Mar 2018 10:22:21 +0000	[thread overview]
Message-ID: <623faa67-7072-3d72-e784-5380e204f570@talktalk.net> (raw)
In-Reply-To: <20180303092307.3796-2-pclouds@gmail.com>

On 03/03/18 09:23, Nguyễn Thái Ngọc Duy wrote:
> 
> There is not a strong reason to hide this option, and git-merge already
> completes this one. Let's allow to complete this for all commands (and
> let git-completion.bash do the suppressing if neede).
> 
> This makes --rerere-autoupdate completable for am, cherry-pick and
> revert.
> 

This is slightly off topic as it doesn't use OPT_RERERE_AUTOUPDATE but
it looks[1] as if rebase is missing completion for --rerere-autoupdate
(and --signoff which is definitely off topic)

Best Wishes

Phillip

[1]
https://git.kernel.org/pub/scm/git/git.git/tree/contrib/completion/git-completion.bash#n2010


> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
>  contrib/completion/git-completion.bash | 3 +--
>  parse-options.h                        | 4 ++--
>  rerere.h                               | 3 +--
>  3 files changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 0ddf40063b..c310b241d3 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -1754,8 +1754,7 @@ _git_merge ()
>  
>  	case "$cur" in
>  	--*)
> -		__gitcomp_builtin merge "--rerere-autoupdate
> -				--no-rerere-autoupdate
> +		__gitcomp_builtin merge "--no-rerere-autoupdate
>  				--no-commit --no-edit --no-ff
>  				--no-log --no-progress
>  				--no-squash --no-stat
> diff --git a/parse-options.h b/parse-options.h
> index 0ba08691e6..ab1cc362bf 100644
> --- a/parse-options.h
> +++ b/parse-options.h
> @@ -148,8 +148,8 @@ struct option {
>  #define OPT_STRING_LIST(s, l, v, a, h) \
>  				    { OPTION_CALLBACK, (s), (l), (v), (a), \
>  				      (h), 0, &parse_opt_string_list }
> -#define OPT_UYN(s, l, v, h, f)      { OPTION_CALLBACK, (s), (l), (v), NULL, \
> -				      (h), PARSE_OPT_NOARG|(f), &parse_opt_tertiary }
> +#define OPT_UYN(s, l, v, h)         { OPTION_CALLBACK, (s), (l), (v), NULL, \
> +				      (h), PARSE_OPT_NOARG, &parse_opt_tertiary }
>  #define OPT_DATE(s, l, v, h) \
>  	{ OPTION_CALLBACK, (s), (l), (v), N_("time"),(h), 0,	\
>  	  parse_opt_approxidate_cb }
> diff --git a/rerere.h b/rerere.h
> index 5e5a312e4c..c2961feaaa 100644
> --- a/rerere.h
> +++ b/rerere.h
> @@ -37,7 +37,6 @@ extern void rerere_clear(struct string_list *);
>  extern void rerere_gc(struct string_list *);
>  
>  #define OPT_RERERE_AUTOUPDATE(v) OPT_UYN(0, "rerere-autoupdate", (v), \
> -	N_("update the index with reused conflict resolution if possible"), \
> -	PARSE_OPT_NOCOMPLETE)
> +	N_("update the index with reused conflict resolution if possible"))
>  
>  #endif
> 


  parent reply	other threads:[~2018-03-06 10:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-03  9:23 [PATCH 0/2] nd/parseopt-completion fixups Nguyễn Thái Ngọc Duy
2018-03-03  9:23 ` [PATCH 1/2] completion: don't set PARSE_OPT_NOCOMPLETE on --rerere-autoupdate Nguyễn Thái Ngọc Duy
2018-03-03  9:34   ` Eric Sunshine
2018-03-06 10:22   ` Phillip Wood [this message]
2018-03-03  9:23 ` [PATCH 2/2] completion: simplify _git_notes Nguyễn Thái Ngọc Duy
2018-03-03 12:32   ` SZEDER Gábor
2018-03-03 13:09   ` SZEDER Gábor
2018-03-06 22:42     ` Junio C Hamano
2018-03-07  1:08       ` SZEDER Gábor
2018-03-07 18:51         ` Junio C Hamano
2018-03-07  1:05 ` [PATCH v2 0/4] nd/parseopt-completion fixups Nguyễn Thái Ngọc Duy
2018-03-07  1:05   ` [PATCH v2 1/4] completion: don't set PARSE_OPT_NOCOMPLETE on --rerere-autoupdate Nguyễn Thái Ngọc Duy
2018-03-07  1:05   ` [PATCH v2 2/4] completion: simplify _git_notes Nguyễn Thái Ngọc Duy
2018-03-07  1:05   ` [PATCH v2 3/4] completion: complete --{reuse,reedit}-message= for all notes subcmds Nguyễn Thái Ngọc Duy
2018-03-07  1:05   ` [PATCH v2 4/4] completion: more subcommands in _git_notes() Nguyễn Thái Ngọc Duy

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=623faa67-7072-3d72-e784-5380e204f570@talktalk.net \
    --to=phillip.wood@talktalk.net \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    --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 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).