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

Re: [PATCH] completion: complete paths for git send-email

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 21, 2026, 19:22 UTC
Message-ID
<xmqqqzkww3ky.fsf@gitster.g>
In-Reply-To
<al-0ckPhoa-ZPhSi@yury>
Yury Norov <ynorov@nvidia.com> writes:
Show 17 quoted lines
>> In any case, when both a '0001-my-changes.patch' file and a
>> '0-tolerance-policy' branch exist in your repository and current
>> working directory, running:
>> 
>>     $ git send-email 0<TAB>
>> 
>> should offer both as candidates, I thihk.  Since I only ever pass
>> filenames to the command, I personally do not think it is a huge
>> loss if the completion script stops looking at refs and sticks to
>> filenames only, but others may have a use for that feature.
>
> Agree. The test should create a file 0001.patch, then a tag
> 0-tag, then a branch 0-branch, maybe something else that is
> relevant; and then make sure every option is correctly offered
> by autocompletion.
>
> Guys please let me know if everything else is needed before I send v2.

So in short, we want the problem description updated to something like:

   When branches and tags whose names share the same prefix as a
   file (or a directory???) that stores a patch exist, the attempt
   to complete that shared prefix
       $ git send-email that-shared-prefix<TAB>
   should offer both branches, tags, and files (and directories???).
   But the completion only offers branches and tags and fails to
   offer files.

And the description of the solution would follow after that in the proposed log message.

As to the tests, using 40-hex is misleading, and 0-branch as you said would be sufficient to reproduce and demonstrate the issue, and that your code change fixes it.

Ben, anything I missed?
Thanks.
Previous: Yury NorovNext: Ben Knoble
Message 6 of 9 in “completion: complete paths for git send-email”
  1. completion: complete paths for git send-emailYury Norov (NVIDIA), Jul 19, 2026
  2. Junio C HamanoJul 19, 2026
  3. D. Ben KnobleJul 21, 2026
  4. Junio C HamanoJul 21, 2026
  5. Yury NorovJul 21, 2026
  6. Junio C HamanoJul 21, 2026
  7. Ben KnobleJul 22, 2026
  8. Junio C HamanoJul 22, 2026
  9. SZEDER GáborJul 21, 2026

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.