git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Keeping <john@keeping.me.uk>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Johannes Sixt <j6t@kdbg.org>
Subject: Re: [PATCH v2 1/3] completion: complete "unstuck" `git push --recurse-submodules`
Date: Tue, 22 Jul 2014 21:57:30 +0100	[thread overview]
Message-ID: <20140722205730.GD26927@serenity.lan> (raw)
In-Reply-To: <xmqqr41df8hu.fsf@gitster.dls.corp.google.com>

On Tue, Jul 22, 2014 at 01:23:25PM -0700, Junio C Hamano wrote:
> John Keeping <john@keeping.me.uk> writes:
> 
> > Since the argument to `--recurse-submodules` is mandatory, it does not
> > need to be stuck to the option with `=`.
> >
> > Signed-off-by: John Keeping <john@keeping.me.uk>
> > ---
> > Change since v1:
> >     - Fix typo --recurse{_ => -}submodules
> >     - Dropped previous patch 1/4 adding ";;" at the end of the "--repo" case
> >
> >  contrib/completion/git-completion.bash | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> > index 7a6e1d7..bed3665 100644
> > --- a/contrib/completion/git-completion.bash
> > +++ b/contrib/completion/git-completion.bash
> > @@ -1624,6 +1624,10 @@ __git_push_recurse_submodules="check on-demand"
> >  _git_push ()
> >  {
> >  	case "$prev" in
> > +	--recurse-submodules)
> > +		__gitcomp "$__git_push_recurse_submodules"
> > +		return
> > +		;;
> >  	--repo)
> >  		__gitcomp_nl "$(__git_remotes)"
> >  		return
> 
> If you mimick the order they are handled in the case on "$cur", it
> would also let us sneak in the missing-optional ";;" to case/esac to
> keep symmetry between the two ;-)
> 
> In other words, like this, perhaps?

Makes sense.  I don't think I noted the order in the "$cur" case, I just
put the new one in here so that they were sorted lexicographically.

Do you want me to re-roll with this change or can you replace the patch
while applying?

> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 019026e..b27f385 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -1617,6 +1617,11 @@ _git_push ()
>  	--repo)
>  		__gitcomp_nl "$(__git_remotes)"
>  		return
> +		;;
> +	--recurse-submodules)
> +		__gitcomp "$__git_push_recurse_submodules"
> +		return
> +		;;
>  	esac
>  	case "$cur" in
>  	--repo=*)
> -- 
> 2.0.2-892-g223db29

  reply	other threads:[~2014-07-22 20:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-19  9:45 [PATCH 1/4] completion: add missing terminator in case statement John Keeping
2014-07-19  9:45 ` [PATCH 2/4] completion: complete "unstuck" `git push --recurse-submodules` John Keeping
2014-07-19 11:37   ` Johannes Sixt
2014-07-19 15:10     ` John Keeping
2014-07-19  9:45 ` [PATCH 3/4] completion: add some missing options to `git push` John Keeping
2014-07-19  9:45 ` [PATCH 4/4] completion: complete `git push --force-with-lease=` John Keeping
2014-07-21 17:26 ` [PATCH 1/4] completion: add missing terminator in case statement Junio C Hamano
2014-07-21 20:09   ` Junio C Hamano
2014-07-22 18:22     ` John Keeping
2014-07-22 20:18       ` Junio C Hamano
2014-07-22 18:24 ` [PATCH v2 1/3] completion: complete "unstuck" `git push --recurse-submodules` John Keeping
2014-07-22 18:24   ` [PATCH v2 2/3] completion: add some missing options to `git push` John Keeping
2014-07-22 18:24   ` [PATCH v2 3/3] completion: complete `git push --force-with-lease=` John Keeping
2014-07-22 20:23   ` [PATCH v2 1/3] completion: complete "unstuck" `git push --recurse-submodules` Junio C Hamano
2014-07-22 20:57     ` John Keeping [this message]
2014-07-22 21:17       ` Junio C Hamano
2014-07-23 19:35         ` John Keeping
2014-07-23 21:31           ` 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=20140722205730.GD26927@serenity.lan \
    --to=john@keeping.me.uk \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.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.
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).