Re: [PATCH] completion: complete paths for git send-email
Junio C Hamano <[email protected]>
| Newsgroups | org.kernel.vger.git,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Yury Norov <[email protected]> writes: >> 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.