git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "SZEDER Gábor" <szeder@ira.uka.de>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] completion: add format-patch options to send-email
Date: Tue, 16 Oct 2012 00:48:57 +0200	[thread overview]
Message-ID: <20121015224857.GA2156@goldbirke> (raw)
In-Reply-To: <1350231243-13485-1-git-send-email-felipe.contreras@gmail.com>

Hi,

On Sun, Oct 14, 2012 at 06:14:03PM +0200, Felipe Contreras wrote:
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>  contrib/completion/git-completion.bash | 35 +++++++++++++++++-----------------
>  t/t9902-completion.sh                  | 21 ++++++++++++++++++++
>  2 files changed, 39 insertions(+), 17 deletions(-)
> 
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index d743e56..2a83504 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash

This patch doesn't apply on current master.

> @@ -1559,11 +1559,12 @@ _git_send_email ()
>  			--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"
> +			--validate --no-validate
> +			$__git_format_patch_options"
>  		return
>  		;;
>  	esac
> -	COMPREPLY=()
> +	__git_complete_revlist_file

While send-email accepts a rev-list, it doesn't accept
'HEAD:Documentation', does it?  So __git_complete_revlist() would be
better here, because that makes the intent clear.

>  }
>  
>  _git_stage ()
> diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh
> index 92d7eb4..c4b6c13 100755
> --- a/t/t9902-completion.sh
> +++ b/t/t9902-completion.sh
> @@ -146,6 +146,22 @@ test_expect_success '__gitcomp - suffix' '
>  	test_cmp expected out
>  '
>  
> +setup_repository ()
> +{
> +	mkdir "$1" && (
> +	cd "$1" &&
> +	git init &&
> +	test_tick &&
> +	git commit --allow-empty -m "Initial"
> +	)
> +}
> +
> +test_expect_success 'prepare' '
> +	setup_repository one &&
> +	git clone one test &&

Why are these new repositories needed?

> +	cd test

This 'cd' makes all subsequent tests to be executed in a different
repository than previously, which breaks 'checkout completes ref
names'.

> +'
> +
>  test_expect_success 'basic' '
>  	run_completion "git \"\"" &&
>  	# built-in
> @@ -228,4 +244,9 @@ test_expect_success 'general options plus command' '
>  	test_completion "git --no-replace-objects check" "checkout "
>  '
>  
> +test_expect_success 'send-email' '
> +	test_completion "git send-email --cov" "--cover-letter " &&
> +	test_completion "git send-email ma" "master "
> +'
> +
>  test_done
> -- 
> 1.7.12.1
> 

  reply	other threads:[~2012-10-15 22:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-14 16:14 [PATCH] completion: add format-patch options to send-email Felipe Contreras
2012-10-15 22:48 ` SZEDER Gábor [this message]
2012-10-15 23:28   ` Junio C Hamano
2012-10-15 23:37   ` Felipe Contreras
2012-10-15 23:55     ` SZEDER Gábor
2012-10-15 23:57     ` Felipe Contreras

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=20121015224857.GA2156@goldbirke \
    --to=szeder@ira.uka.de \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).