git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] completion: add format-patch options to send-email

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Oct 15, 2012, 23:37 UTC
Message-ID
<CAMP44s07iydg0aMDQMTX7qh4Kk8w--sp1DtmTUeu=95WzAXfRQ@mail.gmail.com>
In-Reply-To
<20121015224857.GA2156@goldbirke>
On Tue, Oct 16, 2012 at 12:48 AM, SZEDER Gábor <szeder@ira.uka.de> wrote:
Show 16 quoted lines
>> @@ -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.

Then _git_send_email should be fixed first. I'm simply doing the same as _git_send_email.

Show 23 quoted lines
>> 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?
Because otherwise 'git send-email ma' wouldn't succeed.
Show 5 quoted lines
>> +     cd test
>
> This 'cd' makes all subsequent tests to be executed in a different
> repository than previously, which breaks 'checkout completes ref
> names'.

I don't know which test you are talking about, it's not on my repo, and all the completion test pass with this patch.

Cheers.
-- 
Felipe Contreras
Previous: Junio C HamanoNext: SZEDER Gábor
Message 4 of 6 in “completion: add format-patch options to send-email”
  1. completion: add format-patch options to send-emailFelipe Contreras, Oct 14, 2012
  2. SZEDER GáborOct 15, 2012
  3. Junio C HamanoOct 15, 2012
  4. Felipe ContrerasOct 15, 2012
  5. SZEDER GáborOct 15, 2012
  6. Felipe ContrerasOct 15, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.